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:21:40 +0000 (09:21 +0100)
commit151d15e59a0383b3c5bfca580d4dce3bd8a7b5e8
treeb6b267cec672482533099c2b9085e9494cf51dec
parent306abd4fb430909941cbd301af6fdb8a1874410b
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)

(cherry picked from commit e4a94bcc77f3fda0f185e62a73a66d9b9b9388f5)
ssl/ssl_lib.c