From: William Lallemand Date: Fri, 7 Aug 2020 12:48:37 +0000 (+0200) Subject: BUG/MINOR: snapshots: leak of snapshots on deinit() X-Git-Tag: v2.3-dev3~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=efc5a9d55ba46a934f1474802b90c679461ebc92;p=thirdparty%2Fhaproxy.git BUG/MINOR: snapshots: leak of snapshots on deinit() 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. --- diff --git a/src/haproxy.c b/src/haproxy.c index c6f7394269..e891eb058e 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -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)