diff options
Diffstat (limited to 'crypto/cmac')
-rw-r--r-- | crypto/cmac/cmac.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/cmac/cmac.c b/crypto/cmac/cmac.c index c4f13a069f..0f4ca26bc2 100644 --- a/crypto/cmac/cmac.c +++ b/crypto/cmac/cmac.c @@ -60,7 +60,7 @@ CMAC_CTX *CMAC_CTX_new(void) void CMAC_CTX_cleanup(CMAC_CTX *ctx) { - EVP_CIPHER_CTX_free(ctx->cctx); + EVP_CIPHER_CTX_cleanup(ctx->cctx); OPENSSL_cleanse(ctx->tbl, EVP_MAX_BLOCK_LENGTH); OPENSSL_cleanse(ctx->k1, EVP_MAX_BLOCK_LENGTH); OPENSSL_cleanse(ctx->k2, EVP_MAX_BLOCK_LENGTH); @@ -78,6 +78,7 @@ void CMAC_CTX_free(CMAC_CTX *ctx) if (!ctx) return; CMAC_CTX_cleanup(ctx); + EVP_CIPHER_CTX_free(ctx->cctx); OPENSSL_free(ctx); } |