]> git.kaiwu.me - haproxy.git/commitdiff
BUG/MINOR: ssl: Fix leak of ca_list in cafile_entry
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Wed, 9 Sep 2026 09:06:00 +0000 (11:06 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Fri, 11 Sep 2026 13:06:57 +0000 (15:06 +0200)
The list of X509_NAMEs was not freed when deleting cafile entries.

This patch should be backported to all stable branches.

src/ssl_ckch.c

index a4928e1086cc2d3c40fbdccc79fcf65fc6dd6071..5d1bd86abfc77fff82061eeb9ca0a910ced152b1 100644 (file)
@@ -1426,6 +1426,8 @@ void ssl_store_delete_cafile_entry(struct cafile_entry *ca_e)
        if (!ca_e)
                return;
 
+       sk_X509_NAME_pop_free(ca_e->ca_list, X509_NAME_free);
+
        X509_STORE_free(ca_e->ca_store);
 
        list_for_each_entry_safe(link, link_s, &ca_e->ckch_inst_link, list) {