mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-20 22:15:40 +00:00
BUG/MINOR: ssl: free the cafile entries on deinit
The cafile_tree was never free upon deinit, making valgrind and ASAN
complains when haproxy quits.
This could be backported as far as 2.2 but it requires the
ssl_store_delete_cafile_entry() helper from
5daff3c8ab
.
This commit is contained in:
parent
c2d3db44ad
commit
b0c4827c2f
@ -3769,7 +3769,9 @@ void ckch_deinit()
|
|||||||
{
|
{
|
||||||
struct eb_node *node, *next;
|
struct eb_node *node, *next;
|
||||||
struct ckch_store *store;
|
struct ckch_store *store;
|
||||||
|
struct ebmb_node *canode;
|
||||||
|
|
||||||
|
/* deinit the ckch stores */
|
||||||
node = eb_first(&ckchs_tree);
|
node = eb_first(&ckchs_tree);
|
||||||
while (node) {
|
while (node) {
|
||||||
next = eb_next(node);
|
next = eb_next(node);
|
||||||
@ -3777,6 +3779,16 @@ void ckch_deinit()
|
|||||||
ckch_store_free(store);
|
ckch_store_free(store);
|
||||||
node = next;
|
node = next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* deinit the ca-file store */
|
||||||
|
canode = ebmb_first(&cafile_tree);
|
||||||
|
while (canode) {
|
||||||
|
struct cafile_entry *entry = NULL;
|
||||||
|
|
||||||
|
entry = ebmb_entry(canode, struct cafile_entry, node);
|
||||||
|
canode = ebmb_next(canode);
|
||||||
|
ssl_store_delete_cafile_entry(entry);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* register cli keywords */
|
/* register cli keywords */
|
||||||
|
Loading…
Reference in New Issue
Block a user