mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-16 08:24:42 +00:00
BUG/MEDIUM: h2: Don't forget to empty the wait lists on destroy.
Empty both send_list and fctl_list when destroying the h2 context, so that if we're freeing the stream after, it doesn't try to remove itself from the now-deleted list. No backport is needed.
This commit is contained in:
parent
175a2bb507
commit
251f6a23ad
13
src/mux_h2.c
13
src/mux_h2.c
@ -491,6 +491,19 @@ static void h2_release(struct connection *conn)
|
||||
tasklet_free(h2c->wait_list.task);
|
||||
LIST_DEL(&h2c->wait_list.list);
|
||||
LIST_INIT(&h2c->wait_list.list);
|
||||
while (!LIST_ISEMPTY(&h2c->send_list)) {
|
||||
struct wait_list *sw = LIST_ELEM(h2c->send_list.n,
|
||||
struct wait_list *, list);
|
||||
LIST_DEL(&sw->list);
|
||||
LIST_INIT(&sw->list);
|
||||
}
|
||||
while (!LIST_ISEMPTY(&h2c->fctl_list)) {
|
||||
struct wait_list *sw = LIST_ELEM(h2c->fctl_list.n,
|
||||
struct wait_list *, list);
|
||||
LIST_DEL(&sw->list);
|
||||
LIST_INIT(&sw->list);
|
||||
}
|
||||
|
||||
|
||||
pool_free(pool_head_h2c, h2c);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user