From 53508d656487235daadfa744e477dd73937286aa Mon Sep 17 00:00:00 2001 From: Tim Duesterhus Date: Thu, 10 Sep 2020 19:46:40 +0200 Subject: [PATCH] CLEANUP: haproxy: Free post_proxy_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 663922e72..b01707096 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -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();