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.
(cherry picked from commit efc5a9d55ba46a934f1474802b90c679461ebc92)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 147355c50f5b09bd4251a0f886792f4d7cb82aea)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit d666f60378117f068793fdcb875b517af35bb51a)
Signed-off-by: Willy Tarreau <w@1wt.eu>
diff --git a/src/haproxy.c b/src/haproxy.c
index bea6db6..53c6850 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -2402,6 +2402,8 @@
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)