From cca33550749449f713b37fed20b8e45421a15490 Mon Sep 17 00:00:00 2001 From: Aurelien DARRAGON Date: Thu, 9 Mar 2023 12:21:12 +0100 Subject: [PATCH] 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 --- src/haproxy.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/haproxy.c b/src/haproxy.c index 3195be69d..fd43c963a 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(); -- 2.47.3