From: Amaury Denoyelle Date: Fri, 18 Sep 2020 13:59:39 +0000 (+0200) Subject: BUG/MINOR: config: Fix memory leak on config parse listen X-Git-Tag: v2.3-dev5~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36b536652f23c8b9b430d7a7cbb42a696d06a929;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/cfgparse-listen.c b/src/cfgparse-listen.c index bbdf699343..cdfca5b3a7 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);