From: Willy Tarreau Date: Wed, 23 Jan 2013 23:29:37 +0000 (+0100) Subject: BUG/MINOR: config: free peer's address when exiting upon parsing error X-Git-Tag: v1.5-dev18~121 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=846257ececc6ad00cfa75c3a37bb5509303a7c93;p=thirdparty%2Fhaproxy.git BUG/MINOR: config: free peer's address when exiting upon parsing error An error caused by an invalid port does not cause the raddr string to be freed. This is harmless at the moment since we exit, but may have an impact later if we ever support hot config changes. Reported-by: Dinko Korunic --- diff --git a/src/cfgparse.c b/src/cfgparse.c index bbf0da2899..718664c0f5 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -1509,6 +1509,7 @@ int cfg_parse_peers(const char *file, int linenum, char **args, int kwm) if (!realport) { Alert("parsing [%s:%d] : Missing or invalid port in '%s'\n", file, linenum, args[2]); err_code |= ERR_ALERT | ERR_FATAL; + free(raddr); goto out; }