mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +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) {
|
if (getsockname(fd, (struct sockaddr *)&xfer_sock->addr, &socklen) != 0) {
|
||||||
Warning("Failed to get socket address\n");
|
Warning("Failed to get socket address\n");
|
||||||
free(xfer_sock);
|
free(xfer_sock);
|
||||||
|
xfer_sock = NULL;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (curoff >= maxoff) {
|
if (curoff >= maxoff) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user