]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix memory leak on EVP_CIPHER_param_to_asn1 failure openssl-3.0 16786/head
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:55:29 +0000 (16:55 +0200)
commit7a63362eacfbe5e8f4d667c02538b913aa50f69e
tree7a0bf3a9445e398dd2d48e2c1d555493a06dd9db
parent1a8d833db5bdb16d9016bc477664c2480706f8d0
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)

(cherry picked from commit bda2473a44e4534c3c640ce89a0971874165c6df)
crypto/pkcs7/pk7_doit.c