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 <dkorunic@reflected.net>
This commit is contained in:
Willy Tarreau 2013-01-24 00:29:37 +01:00
parent f678b7f322
commit 846257ecec

View File

@ -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;
}