From: Tim Duesterhus Date: Sat, 4 Jul 2020 09:49:49 +0000 (+0200) Subject: CLEANUP: haproxy: Free server_deinit_list in deinit() X-Git-Tag: v2.3-dev1~48 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0837eb11cfa172decc00e501697b561f7d0e6749;p=thirdparty%2Fhaproxy.git CLEANUP: haproxy: Free server_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 88a1c9752f..596595699b 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -2606,7 +2606,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) { @@ -2902,6 +2902,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();