From: Christopher Faulet Date: Wed, 18 Sep 2019 09:07:20 +0000 (+0200) Subject: BUG/MINOR: mux-h2: Be sure to have a connection to unsubcribe X-Git-Tag: v2.1-dev2~60 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=21d849f52fc64c51e5abf5a8bd69f2aeff8b3125;p=thirdparty%2Fhaproxy.git BUG/MINOR: mux-h2: Be sure to have a connection to unsubcribe When the mux is released, It must own the connection to unsubcribe. This patch must be backported to 2.0. --- diff --git a/src/mux_h2.c b/src/mux_h2.c index fababa1903..00c8968f9e 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -923,9 +923,9 @@ static void h2_release(struct h2c *h2c) } if (h2c->wait_event.tasklet) tasklet_free(h2c->wait_event.tasklet); - if (h2c->wait_event.events != 0) + if (conn && h2c->wait_event.events != 0) conn->xprt->unsubscribe(conn, conn->xprt_ctx, h2c->wait_event.events, - &h2c->wait_event); + &h2c->wait_event); pool_free(pool_head_h2c, h2c); }