]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: log: free log forward proxies on deinit()
authorAurelien DARRAGON <adarragon@haproxy.com>
Thu, 9 Mar 2023 11:21:12 +0000 (12:21 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 5 Apr 2023 06:58:16 +0000 (08:58 +0200)
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

index 3195be69de9c4769ffac545fc5b22657350cbcd6..fd43c963a26a6a6707b2e20d06109c36834c5e41 100644 (file)
@@ -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();