From: Tim Duesterhus Date: Sat, 4 Jul 2020 09:49:50 +0000 (+0200) Subject: CLEANUP: haproxy: Free post_server_check_list in deinit() X-Git-Tag: v2.3-dev1~47 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=34bef074c65a2e5c77a231d5d3f7a11797dcc160;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/haproxy.c b/src/haproxy.c index 596595699b..c3bc1f0e5c 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();