From: Tim Duesterhus Date: Sat, 4 Jul 2020 09:49:48 +0000 (+0200) Subject: CLEANUP: haproxy: Free post_deinit_list in deinit() X-Git-Tag: v2.3-dev1~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fdf904a2971040711f143ddf436b258d1e986850;p=thirdparty%2Fhaproxy.git CLEANUP: haproxy: Free post_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 a297c8bd0a..88a1c9752f 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -2604,7 +2604,7 @@ void deinit(void) struct logformat_node *lf, *lfb; struct bind_conf *bind_conf, *bind_back; struct build_opts_str *bol, *bolb; - struct post_deinit_fct *pdf; + struct post_deinit_fct *pdf, *pdfb; struct proxy_deinit_fct *pxdf, *pxdfb; struct server_deinit_fct *srvdf; @@ -2897,6 +2897,11 @@ void deinit(void) free(pxdf); } + list_for_each_entry_safe(pdf, pdfb, &post_deinit_list, list) { + LIST_DEL(&pdf->list); + free(pdf); + } + vars_prune(&global.vars, NULL, NULL); pool_destroy_all(); deinit_pollers();