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 3195be6..fd43c96 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -2783,6 +2783,13 @@
/* 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();