aboutsummaryrefslogtreecommitdiff
path: root/openssl/crypto/cmac/cmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/crypto/cmac/cmac.c')
-rw-r--r--openssl/crypto/cmac/cmac.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/openssl/crypto/cmac/cmac.c b/openssl/crypto/cmac/cmac.c
index c5597a3f7..774e6dc91 100644
--- a/openssl/crypto/cmac/cmac.c
+++ b/openssl/crypto/cmac/cmac.c
@@ -126,6 +126,8 @@ EVP_CIPHER_CTX *CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx)
void CMAC_CTX_free(CMAC_CTX *ctx)
{
+ if (!ctx)
+ return;
CMAC_CTX_cleanup(ctx);
OPENSSL_free(ctx);
}