mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 12:41:00 +02:00
BUG: fix double free in peers config error path
If the local host is not found as a peer in a "peers" section, we have a double free, and possibly a use-after-free because the peers section is freed since it's aliased as the table's name.
This commit is contained in:
parent
b7aeec6333
commit
6f9b003c2b
@ -5931,7 +5931,6 @@ int check_config_validity()
|
||||
else if (!curpeers->peers_fe) {
|
||||
Alert("Proxy '%s': unable to find local peer '%s' in peers section '%s'.\n",
|
||||
curproxy->id, localpeer, curpeers->id);
|
||||
free((void *)curproxy->table.peers.name);
|
||||
curproxy->table.peers.p = NULL;
|
||||
cfgerr++;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user