]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix memleak in rsa_cms_sign error path
authorDaniel Gustafsson <daniel@yesql.se>
Fri, 12 Jul 2024 18:49:16 +0000 (20:49 +0200)
committerTomas Mraz <tomas@openssl.org>
Thu, 5 Sep 2024 15:04:59 +0000 (17:04 +0200)
commit5efc57caf229748fd4f85b05463f96b11679100d
tree0599c2c9e824959398639dcc62956cdeb4ac7720
parent2bb83824bba50c0c37952cf9217f3676d2f0c94d
Fix memleak in rsa_cms_sign error path

If the call to X509_ALGOR_set0 fails then the allocated ASN1_STRING
variable passed as parameter leaks.  Fix by explicitly freeing like
how all other codepaths with X509_ALGOR_set0 do.

Fixes #22680

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24868)
crypto/cms/cms_rsa.c