]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: ssl: Free key_base from global_ssl structure during deinit
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Fri, 10 Oct 2025 15:05:22 +0000 (17:05 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Fri, 10 Oct 2025 15:22:48 +0000 (17:22 +0200)
The key_base field of the global_ssl structure is an strdup'ed field
(when set) which was never free'd during deinit.

This patch can be backported up to branch 3.0.

src/ssl_sock.c

index 8cd9604aab75645a2fb84059589069b501e7d1d1..13339fa1b3328020ad582c80b5929ec74700ba05 100644 (file)
@@ -7965,6 +7965,7 @@ static void ssl_sock_clt_sni_free_func(void *parent, void *ptr, CRYPTO_EX_DATA *
 static void ssl_free_global(void)
 {
        ha_free(&global_ssl.crt_base);
+       ha_free(&global_ssl.key_base);
        ha_free(&global_ssl.ca_base);
 
        ha_free(&global_ssl.issuers_chain_path);