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 70d442c40..7f05d39a8 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -2605,7 +2605,7 @@ void deinit(void)
        struct build_opts_str *bol, *bolb;
        struct post_deinit_fct *pdf, *pdfb;
        struct proxy_deinit_fct *pxdf, *pxdfb;
-       struct server_deinit_fct *srvdf;
+       struct server_deinit_fct *srvdf, *srvdfb;
 
        deinit_signals();
        while (p) {
@@ -2901,6 +2901,11 @@ void deinit(void)
                free(pdf);
        }
 
+       list_for_each_entry_safe(srvdf, srvdfb, &server_deinit_list, list) {
+               LIST_DEL(&srvdf->list);
+               free(srvdf);
+       }
+
        vars_prune(&global.vars, NULL, NULL);
        pool_destroy_all();
        deinit_pollers();
-- 
2.27.0


Reply via email to