diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2021-10-04 19:45:19 +0200 |
---|---|---|
committer | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2021-10-06 15:11:03 +0200 |
commit | d5f6b038fe75f12603a67d0a67492aca4be9ccec (patch) | |
tree | c7bf2a50d0408bde1b32e60f41de7dfd8dd279e8 /engines | |
parent | d62c5d6be13cca99fa94e780e55a1c63445ad9cd (diff) | |
download | openssl-new-d5f6b038fe75f12603a67d0a67492aca4be9ccec.tar.gz |
Fix a memory leak in the afalg engine
Fixes: #16743
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16744)
(cherry picked from commit 6f6a5e0c7c41b6b3639e51f435cd98bb3ae061bc)
Diffstat (limited to 'engines')
-rw-r--r-- | engines/e_afalg.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/engines/e_afalg.c b/engines/e_afalg.c index d8d3ef610c..2c08cbb28d 100644 --- a/engines/e_afalg.c +++ b/engines/e_afalg.c @@ -683,11 +683,8 @@ static int afalg_cipher_cleanup(EVP_CIPHER_CTX *ctx) } actx = (afalg_ctx *) EVP_CIPHER_CTX_get_cipher_data(ctx); - if (actx == NULL || actx->init_done != MAGIC_INIT_NUM) { - ALG_WARN("%s afalg ctx passed\n", - ctx == NULL ? "NULL" : "Uninitialised"); - return 0; - } + if (actx == NULL || actx->init_done != MAGIC_INIT_NUM) + return 1; close(actx->sfd); close(actx->bfd); |