]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix memory leak on EVP_CIPHER_param_to_asn1 failure
author77tiann <27392025k@gmail.com>
Thu, 31 Jul 2025 00:47:06 +0000 (17:47 -0700)
committerTomas Mraz <tomas@openssl.org>
Mon, 11 Aug 2025 14:54:46 +0000 (16:54 +0200)
commitbda2473a44e4534c3c640ce89a0971874165c6df
treed177dd94b61349039738f5098404d18c80c4e55d
parentd68986f1e608c2d2f3dd59cd0d2aa23b3e9cd9ce
Fix memory leak on EVP_CIPHER_param_to_asn1 failure

When EVP_CIPHER_param_to_asn1() fails, xalg->parameter was not freed,
leading to a memory leak. This patch adds proper cleanup for that case.
CLA: trivial

Signed-off-by: 77tiann <27392025k@gmail.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28131)
crypto/pkcs7/pk7_doit.c