From f3e03a40667c1dfadb29621888d0420b50a3b6d2 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Thu, 21 Apr 2022 15:41:34 +0200 Subject: [PATCH] BUG/MINOR: mux-quic: unsubscribe on release Unsubscribe from lower layer on qc_release. This ensures that the lower layer won't wake up a null tasklet after the MUX has been released and may prevent a crash. --- src/mux_quic.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mux_quic.c b/src/mux_quic.c index 6a65d6923..31ef6d556 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -518,6 +518,11 @@ static void qc_release(struct qcc *qcc) if (qcc->wait_event.tasklet) tasklet_free(qcc->wait_event.tasklet); + if (conn && qcc->wait_event.events) { + conn->xprt->unsubscribe(conn, conn->xprt_ctx, + qcc->wait_event.events, + &qcc->wait_event); + } /* liberate remaining qcs instances */ node = eb64_first(&qcc->streams_by_id);