mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-11 00:09:42 +00:00
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:
parent
f678b7f322
commit
846257ecec
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user