From 21d849f52fc64c51e5abf5a8bd69f2aeff8b3125 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Wed, 18 Sep 2019 11:07:20 +0200 Subject: [PATCH] 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. --- src/mux_h2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mux_h2.c b/src/mux_h2.c index fababa190..00c8968f9 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); }