From 34bef074c65a2e5c77a231d5d3f7a11797dcc160 Mon Sep 17 00:00:00 2001 From: Tim Duesterhus Date: Sat, 4 Jul 2020 11:49:50 +0200 Subject: [PATCH] CLEANUP: haproxy: Free post_server_check_list in deinit() This allocation is technically always reachable and cannot leak, but so are a few others that *are* freed. --- src/haproxy.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/haproxy.c b/src/haproxy.c index 596595699..c3bc1f0e5 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -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();