]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: haproxy: Free post_proxy_check_list in deinit()
authorTim Duesterhus <tim@bastelstu.be>
Thu, 10 Sep 2020 17:46:40 +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 663922e72a01b69c7d3f88bda6c54a56c33c3f7d..b01707096a1e891f9e5683d786306931334acbe1 100644 (file)
@@ -2403,6 +2403,7 @@ void deinit(void)
        struct proxy_deinit_fct *pxdf, *pxdfb;
        struct server_deinit_fct *srvdf, *srvdfb;
        struct post_server_check_fct *pscf, *pscfb;
+       struct post_proxy_check_fct *ppcf, *ppcfb;
 
        deinit_signals();
        while (p) {
@@ -2722,6 +2723,11 @@ void deinit(void)
                free(pscf);
        }
 
+       list_for_each_entry_safe(ppcf, ppcfb, &post_proxy_check_list, list) {
+               LIST_DEL(&ppcf->list);
+               free(ppcf);
+       }
+
        vars_prune(&global.vars, NULL, NULL);
        pool_destroy_all();
        deinit_pollers();