diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/evp/evp_digest.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libcrypto/evp/evp_digest.c b/src/lib/libcrypto/evp/evp_digest.c index 166b045625..9d8d94afb1 100644 --- a/src/lib/libcrypto/evp/evp_digest.c +++ b/src/lib/libcrypto/evp/evp_digest.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: evp_digest.c,v 1.7 2023/12/29 07:22:47 tb Exp $ */ | 1 | /* $OpenBSD: evp_digest.c,v 1.8 2024/01/30 17:41:01 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -258,10 +258,12 @@ EVP_MD_CTX_reset(EVP_MD_CTX *ctx) | |||
258 | return EVP_MD_CTX_cleanup(ctx); | 258 | return EVP_MD_CTX_cleanup(ctx); |
259 | } | 259 | } |
260 | 260 | ||
261 | /* This call frees resources associated with the context */ | ||
262 | int | 261 | int |
263 | EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx) | 262 | EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx) |
264 | { | 263 | { |
264 | if (ctx == NULL) | ||
265 | return 1; | ||
266 | |||
265 | /* | 267 | /* |
266 | * Don't assume ctx->md_data was cleaned in EVP_Digest_Final, | 268 | * Don't assume ctx->md_data was cleaned in EVP_Digest_Final, |
267 | * because sometimes only copies of the context are ever finalised. | 269 | * because sometimes only copies of the context are ever finalised. |