diff options
Diffstat (limited to 'src/lib/libcrypto/hmac/hm_pmeth.c')
| -rw-r--r-- | src/lib/libcrypto/hmac/hm_pmeth.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/libcrypto/hmac/hm_pmeth.c b/src/lib/libcrypto/hmac/hm_pmeth.c index 676305fdcb..4017f570b8 100644 --- a/src/lib/libcrypto/hmac/hm_pmeth.c +++ b/src/lib/libcrypto/hmac/hm_pmeth.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: hm_pmeth.c,v 1.12 2022/03/30 07:12:30 tb Exp $ */ | 1 | /* $OpenBSD: hm_pmeth.c,v 1.13 2022/03/30 07:17:48 tb Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2007. | 3 | * project 2007. |
| 4 | */ | 4 | */ |
| @@ -116,7 +116,10 @@ pkey_hmac_copy(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src) | |||
| 116 | static void | 116 | static void |
| 117 | pkey_hmac_cleanup(EVP_PKEY_CTX *ctx) | 117 | pkey_hmac_cleanup(EVP_PKEY_CTX *ctx) |
| 118 | { | 118 | { |
| 119 | HMAC_PKEY_CTX *hctx = ctx->data; | 119 | HMAC_PKEY_CTX *hctx; |
| 120 | |||
| 121 | if ((hctx = ctx->data) == NULL) | ||
| 122 | return; | ||
| 120 | 123 | ||
| 121 | HMAC_CTX_cleanup(&hctx->ctx); | 124 | HMAC_CTX_cleanup(&hctx->ctx); |
| 122 | freezero(hctx->ktmp.data, hctx->ktmp.length); | 125 | freezero(hctx->ktmp.data, hctx->ktmp.length); |
