]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: ssl: free bind_conf_node in crtlist_free()
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 23 Jun 2020 09:43:35 +0000 (11:43 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Tue, 23 Jun 2020 18:07:32 +0000 (20:07 +0200)
Free the list of bind_conf using a crt-list in crtlist_free()

src/ssl_crtlist.c

index 266949e59d5ba595e93bace4e58be7214d4a8d16..0fbd3f0ac2a7563a97ac4357a9eb5b37fa95f96a 100644 (file)
@@ -148,10 +148,18 @@ struct crtlist_entry *crtlist_entry_new()
 void crtlist_free(struct crtlist *crtlist)
 {
        struct crtlist_entry *entry, *s_entry;
+       struct bind_conf_list *bind_conf_node;
 
        if (crtlist == NULL)
                return;
 
+       bind_conf_node = crtlist->bind_conf;
+       while (bind_conf_node) {
+               struct bind_conf_list *next = bind_conf_node->next;
+               free(bind_conf_node);
+               bind_conf_node = next;
+       }
+
        list_for_each_entry_safe(entry, s_entry, &crtlist->ord_entries, by_crtlist) {
                crtlist_entry_free(entry);
        }