]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: snapshots: leak of snapshots on deinit()
authorWilliam Lallemand <wlallemand@haproxy.com>
Fri, 7 Aug 2020 12:48:37 +0000 (14:48 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Fri, 7 Aug 2020 12:55:33 +0000 (14:55 +0200)
Free the snapshots on deinit() when they were initialized in a proxy
upon an error.

This was introduced by c55015e ("MEDIUM: snapshots: dynamically allocate
the snapshots").

Should be backported as far as 1.9.

src/haproxy.c

index c6f7394269c9dd216b1d429a18d1ecdd6e0e9564..e891eb058e65b3ae05a05b2a1758e22825a7a3cc 100644 (file)
@@ -2620,6 +2620,8 @@ void deinit(void)
                free(p->capture_name);
                free(p->monitor_uri);
                free(p->rdp_cookie_name);
+               free(p->invalid_rep);
+               free(p->invalid_req);
                if (p->conf.logformat_string != default_http_log_format &&
                    p->conf.logformat_string != default_tcp_log_format &&
                    p->conf.logformat_string != clf_http_log_format)