]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MAJOR: peers: initialize s->buffer_wait when creating the session
authorWilly Tarreau <w@1wt.eu>
Sat, 14 Feb 2015 13:14:57 +0000 (14:14 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 14 Feb 2015 13:16:35 +0000 (14:16 +0100)
Commit bf883e0 ("MAJOR: session: implement a wait-queue for sessions who
need a buffer") introduced in 1.6 forgot to initialize the buffer_wait
list when the session is initiated by an applet for a peer, resulting in
a crash. Thanks to Chris Kopp for reporting the issue.

src/peers.c

index 23c4ea364bbc66dab4686ea9ee367de190019f02..2357c0cabef143b3ce6b9e65df5f182011628bac 100644 (file)
@@ -1134,6 +1134,7 @@ static struct session *peer_session_create(struct peer *peer, struct peer_sessio
 
        LIST_ADDQ(&sessions, &s->list);
        LIST_INIT(&s->back_refs);
+       LIST_INIT(&s->buffer_wait);
 
        s->flags = SN_ASSIGNED|SN_ADDR_SET;