]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: haproxy: Free post_server_check_list in deinit()
authorTim Duesterhus <tim@bastelstu.be>
Sat, 4 Jul 2020 09:49:50 +0000 (11:49 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 7 Jul 2020 14:52:35 +0000 (16:52 +0200)
This allocation is technically always reachable and cannot leak, but so are
a few others that *are* freed.

src/haproxy.c

index 596595699bc00a854be40344061e00b52bcac0c5..c3bc1f0e5cc86a2a8e45f156385a07678301a28e 100644 (file)
@@ -2607,6 +2607,7 @@ void deinit(void)
        struct post_deinit_fct *pdf, *pdfb;
        struct proxy_deinit_fct *pxdf, *pxdfb;
        struct server_deinit_fct *srvdf, *srvdfb;
+       struct post_server_check_fct *pscf, *pscfb;
 
        deinit_signals();
        while (p) {
@@ -2907,6 +2908,11 @@ void deinit(void)
                free(srvdf);
        }
 
+       list_for_each_entry_safe(pscf, pscfb, &post_server_check_list, list) {
+               LIST_DEL(&pscf->list);
+               free(pscf);
+       }
+
        vars_prune(&global.vars, NULL, NULL);
        pool_destroy_all();
        deinit_pollers();