Merge pull request #10151 from jefferyto/python-bpo-38243-34155
[feed/packages.git] / net / haproxy / patches / 001-BUG-MINOR-mux-h2-Be-sure-to-have-a-connection-to-unsubcribe.patch
1 commit 0e01256a314a6f432ab9826dc9b862e8159dbc48
2 Author: Christopher Faulet <cfaulet@haproxy.com>
3 Date: Wed Sep 18 11:07:20 2019 +0200
4
5 BUG/MINOR: mux-h2: Be sure to have a connection to unsubcribe
6
7 When the mux is released, It must own the connection to unsubcribe.
8 This patch must be backported to 2.0.
9
10 (cherry picked from commit 21d849f52fc64c51e5abf5a8bd69f2aeff8b3125)
11 Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
12
13 diff --git a/src/mux_h2.c b/src/mux_h2.c
14 index 984a81bd..e6bfd03d 100644
15 --- a/src/mux_h2.c
16 +++ b/src/mux_h2.c
17 @@ -677,9 +677,9 @@ static void h2_release(struct h2c *h2c)
18 }
19 if (h2c->wait_event.tasklet)
20 tasklet_free(h2c->wait_event.tasklet);
21 - if (h2c->wait_event.events != 0)
22 + if (conn && h2c->wait_event.events != 0)
23 conn->xprt->unsubscribe(conn, conn->xprt_ctx, h2c->wait_event.events,
24 - &h2c->wait_event);
25 + &h2c->wait_event);
26
27 pool_free(pool_head_h2c, h2c);
28 }