mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-21 06:06:59 -04: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
1 changed files with 0 additions and 1 deletions
|
|
@ -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…
Reference in a new issue