This allocation is technically always reachable and cannot leak, but so are
a few others that *are* freed.
---
 src/haproxy.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/haproxy.c b/src/haproxy.c
index 53301c0be..64d7e0eea 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -2604,7 +2604,7 @@ void deinit(void)
        struct bind_conf *bind_conf, *bind_back;
        struct build_opts_str *bol, *bolb;
        struct post_deinit_fct *pdf;
-       struct proxy_deinit_fct *pxdf;
+       struct proxy_deinit_fct *pxdf, *pxdfb;
        struct server_deinit_fct *srvdf;
 
        deinit_signals();
@@ -2891,6 +2891,11 @@ void deinit(void)
                free(bol);
        }
 
+       list_for_each_entry_safe(pxdf, pxdfb, &proxy_deinit_list, list) {
+               LIST_DEL(&pxdf->list);
+               free(pxdf);
+       }
+
        vars_prune(&global.vars, NULL, NULL);
        pool_destroy_all();
        deinit_pollers();
-- 
2.27.0


Reply via email to