summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/evp_cipher.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/evp/evp_cipher.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libcrypto/evp/evp_cipher.c b/src/lib/libcrypto/evp/evp_cipher.c
index 51bbf70654..abdc33eace 100644
--- a/src/lib/libcrypto/evp/evp_cipher.c
+++ b/src/lib/libcrypto/evp/evp_cipher.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp_cipher.c,v 1.16 2024/01/07 15:21:04 tb Exp $ */ 1/* $OpenBSD: evp_cipher.c,v 1.17 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 *
@@ -627,6 +627,9 @@ EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *ctx)
627int 627int
628EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *ctx) 628EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *ctx)
629{ 629{
630 if (ctx == NULL)
631 return 1;
632
630 if (ctx->cipher != NULL) { 633 if (ctx->cipher != NULL) {
631 /* XXX - Avoid leaks, so ignore return value of cleanup()... */ 634 /* XXX - Avoid leaks, so ignore return value of cleanup()... */
632 if (ctx->cipher->cleanup != NULL) 635 if (ctx->cipher->cleanup != NULL)