From: Aurelien DARRAGON Date: Thu, 9 Mar 2023 11:21:12 +0000 (+0100) Subject: BUG/MINOR: log: free log forward proxies on deinit() X-Git-Tag: v2.8-dev7~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cca33550749449f713b37fed20b8e45421a15490;p=thirdparty%2Fhaproxy.git BUG/MINOR: log: free log forward proxies on deinit() Proxies belonging to the cfg_log_forward proxy list are not cleaned up in haproxy deinit() function. We add the missing cleanup directly in the main deinit() function since no other specific function may be used for this. This could be backported up to 2.4 --- diff --git a/src/haproxy.c b/src/haproxy.c index 3195be69de..fd43c963a2 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -2783,6 +2783,13 @@ void deinit(void) /* we don't need to free sink_proxies_list proxies since it is * already handled in sink_deinit() */ + p = cfg_log_forward; + /* we need to manually clean cfg_log_forward proxy list */ + while (p) { + p0 = p; + p = p->next; + free_proxy(p0); + } /* destroy all referenced defaults proxies */ proxy_destroy_all_unref_defaults();