]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: ssl: leak in ssl-f-use
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 9 Oct 2025 12:57:37 +0000 (14:57 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Fri, 10 Oct 2025 09:22:37 +0000 (11:22 +0200)
Fix the leak of the filename in the struct cfg_crt_node which is a
temporary structure used for ssl-f-use initialization.

Must be backported to 3.2.

src/cfgparse-ssl.c

index d135addcb4ee5bc3ca600f5c224643cb77574898..1d53da59fdcb0d62b1d08bd2f533804f7b7426ed 100644 (file)
@@ -2405,6 +2405,7 @@ error:
        ha_free(&ckch_conf);
        ssl_sock_free_ssl_conf(ssl_conf);
        ha_free(&ssl_conf);
+       ha_free(&cfg_crt_node->filename);
        ha_free(&cfg_crt_node);
        return -1;
 }
@@ -2460,6 +2461,7 @@ static int post_section_frontend_crt_init()
                LIST_DELETE(&n->list);
                /* n->ssl_conf is reused so we don't free them here */
                free(n->ckch_conf);
+               free(n->filename);
                free(n);
        }