]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: ssl: fix deinit of the ca-file tree
authorWilliam Lallemand <wlallemand@haproxy.org>
Mon, 29 Aug 2022 16:36:18 +0000 (18:36 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Mon, 29 Aug 2022 16:51:39 +0000 (18:51 +0200)
Commit b0c4827 ("BUG/MINOR: ssl: free the cafile entries on deinit")
introduced a double free.

The node was never removed from the tree before its free.

Fix issue #1836.

Must be backported where b0c4827 was backported. (2.6 for now).

src/ssl_ckch.c

index d531d39ae980557349fe7e5e0fbed3b1883d2150..6db62e193c115e380b9b6e00884092d6ddf7d125 100644 (file)
@@ -3908,6 +3908,7 @@ void ckch_deinit()
 
                entry = ebmb_entry(canode, struct cafile_entry, node);
                canode = ebmb_next(canode);
+               ebmb_delete(&entry->node);
                ssl_store_delete_cafile_entry(entry);
        }
 }