]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: acme: fix X509_NAME leak when X509_set_issuer_name() fails
authorDavid Carlier <devnexen@gmail.com>
Wed, 18 Feb 2026 21:55:00 +0000 (21:55 +0000)
committerWilliam Lallemand <wlallemand@haproxy.com>
Thu, 19 Feb 2026 09:40:26 +0000 (10:40 +0100)
commit194a67600e6581c94e72565d4aa00b7e7e3b5131
tree3d65b1f181f9ec22845bb1812b094ae6ae136873
parent92e363567977b5a4af6d269a7c6a2c511aa3578a
BUG/MINOR: acme: fix X509_NAME leak when X509_set_issuer_name() fails

In acme_gen_tmp_x509(), if X509_set_issuer_name() fails, the code
jumped to the mkcert_error label without freeing the previously
allocated X509_NAME object. The other error paths after X509_NAME_new()
(X509_NAME_add_entry_by_txt and X509_set_subject_name) already properly
freed the name before jumping to mkcert_error, but this one was missed.

Fix this by freeing name before the goto, consistent with the other
error paths in the same function.

Must be backported as far as 3.3.
src/acme.c