From 707b5369f83f9ecf31ee255f4ff1dadc08c6107b Mon Sep 17 00:00:00 2001 From: MathiasRaoul Date: Thu, 6 Feb 2020 10:31:03 +0000 Subject: quic: fix coverity warning Type: fix Change-Id: I7299b3b0a6d32c1cbe213dc1aadb8260cdec8062 Signed-off-by: MathiasRaoul --- src/plugins/quic/quic_crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/quic/quic_crypto.c') diff --git a/src/plugins/quic/quic_crypto.c b/src/plugins/quic/quic_crypto.c index b644bed3e75..7d513037ccb 100644 --- a/src/plugins/quic/quic_crypto.c +++ b/src/plugins/quic/quic_crypto.c @@ -209,12 +209,12 @@ quic_crypto_setup_cipher (quicly_crypto_engine_t * engine, Exit: if (ret != 0) { - if (*aead_ctx != NULL) + if (aead_ctx && *aead_ctx != NULL) { ptls_aead_free (*aead_ctx); *aead_ctx = NULL; } - if (*hp_ctx != NULL) + if (hp_ctx && *hp_ctx != NULL) { ptls_cipher_free (*hp_ctx); *hp_ctx = NULL; -- cgit 1.2.3-korg