Fix a possible memory leak in dane_tlsa_add
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Wed, 15 Nov 2023 18:46:17 +0000 (19:46 +0100)
committerRichard Levitte <levitte@openssl.org>
Wed, 22 Nov 2023 08:18:21 +0000 (09:18 +0100)
commite4a94bcc77f3fda0f185e62a73a66d9b9b9388f5
tree219dc2fecadfad5cbb4018b287be4fe62a1ec2ef
parent6d552a532754f6ee66d6cc604655deaeb5425b16
Fix a possible memory leak in dane_tlsa_add

Several error cases leak either the X509 object
or the pkey or the danetls_record object.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22743)
ssl/ssl_lib.c