From: Tim Duesterhus Date: Sat, 4 Jul 2020 09:49:47 +0000 (+0200) Subject: CLEANUP: haproxy: Free proxy_deinit_list in deinit() X-Git-Tag: v2.3-dev1~50 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=17e363f7514645efe520957d5f71744920d49a96;p=thirdparty%2Fhaproxy.git CLEANUP: haproxy: Free proxy_deinit_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 dafea44fdd..a297c8bd0a 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -2605,7 +2605,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(); @@ -2892,6 +2892,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();