]> git.ipfire.org Git - thirdparty/openssl.git/commit
x_attrib: fix a memory leak
authorBeat Bolli <dev@drbeat.li>
Thu, 15 Aug 2024 10:35:02 +0000 (12:35 +0200)
committerTomas Mraz <tomas@openssl.org>
Wed, 21 Aug 2024 13:51:29 +0000 (15:51 +0200)
commit223e0020e47e6e8eb6079258ea9d563d1d115132
tree653a83f4b97c7e93df4791d6dc2d2a7d1136e7b7
parent1fb39522a241d7ddaab48e20ec0d6ca383188d38
x_attrib: fix a memory leak

The X509_NAME object needs to be free'd even if printing it fails.

Introduced in be5adfd6e3 ("Support subjectDirectoryAttributes and
associatedInformation exts", 2024-06-18), but subsequently moved in
7bcfb41489 ("ossl_print_attribute_value(): use a sequence value only if
type is a sequence", 2024-08-05).

Signed-off-by: Beat Bolli <dev@drbeat.li>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25207)
crypto/x509/x_attrib.c