diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2024-01-30 17:43:40 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2024-01-30 17:43:40 +0000 |
commit | ca563e138bc87756fd59e84dfccc717388b03109 (patch) | |
tree | 9107bdcbe2905b1e80714184dbb6f0798ee97212 | |
parent | c8b3d5481164fbec75f181cac532cb0243c93922 (diff) |
Remove now unnecessary NULL check before EVP_CIPHER_CTX_cleanup()
-rw-r--r-- | lib/libcrypto/cmac/cmac.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libcrypto/cmac/cmac.c b/lib/libcrypto/cmac/cmac.c index 86b1b2d5bee..81d6ffc9b5d 100644 --- a/lib/libcrypto/cmac/cmac.c +++ b/lib/libcrypto/cmac/cmac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmac.c,v 1.21 2024/01/29 06:05:50 tb Exp $ */ +/* $OpenBSD: cmac.c,v 1.22 2024/01/30 17:43:39 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project. */ @@ -131,8 +131,7 @@ LCRYPTO_ALIAS(CMAC_CTX_new); void CMAC_CTX_cleanup(CMAC_CTX *ctx) { - if (ctx->cipher_ctx != NULL) - (void)EVP_CIPHER_CTX_reset(ctx->cipher_ctx); + (void)EVP_CIPHER_CTX_reset(ctx->cipher_ctx); explicit_bzero(ctx->tbl, EVP_MAX_BLOCK_LENGTH); explicit_bzero(ctx->k1, EVP_MAX_BLOCK_LENGTH); explicit_bzero(ctx->k2, EVP_MAX_BLOCK_LENGTH); |