CLEANUP: deinit: release global and per-proxy server-state variables on deinit
The global server-state base directory and file name are now released on
deinit, as well as per-proxy server-state file name.
(cherry picked from commit f5ea269723a205c22d1ac9fd40b8d7fab5cb47ed)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
diff --git a/src/haproxy.c b/src/haproxy.c
index fa07dd0..9dfdd22 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -2498,6 +2498,7 @@
free(p->cookie_domain);
free(p->cookie_attrs);
free(p->lbprm.arg_str);
+ free(p->server_state_file_name);
free(p->capture_name);
free(p->monitor_uri);
free(p->rdp_cookie_name);
@@ -2764,6 +2765,8 @@
free(oldpids); oldpids = NULL;
free(old_argv); old_argv = NULL;
free(localpeer); localpeer = NULL;
+ free(global.server_state_base); global.server_state_base = NULL;
+ free(global.server_state_file); global.server_state_file = NULL;
task_destroy(idle_conn_task);
idle_conn_task = NULL;