From 36b536652f23c8b9b430d7a7cbb42a696d06a929 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Fri, 18 Sep 2020 15:59:39 +0200 Subject: [PATCH] BUG/MINOR: config: Fix memory leak on config parse listen This memory leak happens if there is two or more defaults section. When the default proxy is reinitialized, the structure member containing the config filename must be freed. Fix github issue #851. Should be backported as far as 1.6. --- src/cfgparse-listen.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cfgparse-listen.c b/src/cfgparse-listen.c index bbdf69934..cdfca5b3a 100644 --- a/src/cfgparse-listen.c +++ b/src/cfgparse-listen.c @@ -479,6 +479,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm) goto out; } + free(defproxy.conf.file); free(defproxy.check_command); free(defproxy.check_path); free(defproxy.cookie_name);