mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
BUG/MINOR: Prevent a use-after-free on error scenario on option "-x".
This was introduced with recent commit f73629d ("MINOR: global: Add an option to get the old listening sockets."). No backport is needed.
This commit is contained in:
parent
106f631280
commit
be7b1ce4c1
@ -997,6 +997,7 @@ static int get_old_sockets(const char *unixsocket)
|
||||
if (getsockname(fd, (struct sockaddr *)&xfer_sock->addr, &socklen) != 0) {
|
||||
Warning("Failed to get socket address\n");
|
||||
free(xfer_sock);
|
||||
xfer_sock = NULL;
|
||||
continue;
|
||||
}
|
||||
if (curoff >= maxoff) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user