]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: unix: Don't mess up when removing the socket from the xfer_sock_list.
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 8 Mar 2018 17:25:49 +0000 (18:25 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 8 Mar 2018 17:33:11 +0000 (18:33 +0100)
When removing the socket from the xfer_sock_list, we want to set
next->prev to prev, not to next->prev, which is useless.

This should be backported to 1.8.

src/proto_uxst.c

index 3ab637f20d19b692be3e323906c47f5e008b153f..0f717385ec3ee2d9766486d488d0cc31580ccc20 100644 (file)
@@ -157,7 +157,7 @@ static int uxst_find_compatible_fd(struct listener *l)
                if (xfer_sock->prev)
                        xfer_sock->prev->next = xfer_sock->next;
                if (xfer_sock->next)
-                       xfer_sock->next->prev = xfer_sock->next->prev;
+                       xfer_sock->next->prev = xfer_sock->prev;
                free(xfer_sock);
        }
        return ret;