aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/c_src/evp_compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/crypto/c_src/evp_compat.h')
-rw-r--r--lib/crypto/c_src/evp_compat.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/crypto/c_src/evp_compat.h b/lib/crypto/c_src/evp_compat.h
index c81d1e35ee..e289ce5e76 100644
--- a/lib/crypto/c_src/evp_compat.h
+++ b/lib/crypto/c_src/evp_compat.h
@@ -48,6 +48,9 @@ static INLINE HMAC_CTX *HMAC_CTX_new()
static INLINE void HMAC_CTX_free(HMAC_CTX *ctx)
{
+ if (ctx == NULL)
+ return;
+
HMAC_CTX_cleanup(ctx);
CRYPTO_free(ctx);
}