]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: haproxy: Free post_check_list in deinit()
authorTim Duesterhus <tim@bastelstu.be>
Thu, 10 Sep 2020 17:46:42 +0000 (19:46 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 11 Sep 2020 05:54:39 +0000 (07:54 +0200)
This allocation is technically always reachable and cannot leak, but so are
a few others that *are* freed.

src/haproxy.c

index 0dc81c78c6c9b9b76fe2129990d4b6596acc17bc..e70870ab04665c12da28a536e22fbd5a6cdb6194 100644 (file)
@@ -2407,6 +2407,7 @@ void deinit(void)
        struct per_thread_alloc_fct *taf, *tafb;
        struct per_thread_free_fct *tff, *tffb;
        struct post_server_check_fct *pscf, *pscfb;
+       struct post_check_fct *pcf, *pcfb;
        struct post_proxy_check_fct *ppcf, *ppcfb;
 
        deinit_signals();
@@ -2722,6 +2723,11 @@ void deinit(void)
                free(srvdf);
        }
 
+       list_for_each_entry_safe(pcf, pcfb, &post_check_list, list) {
+               LIST_DEL(&pcf->list);
+               free(pcf);
+       }
+
        list_for_each_entry_safe(pscf, pscfb, &post_server_check_list, list) {
                LIST_DEL(&pscf->list);
                free(pscf);