]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-quic: unsubscribe on release
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 21 Apr 2022 13:41:34 +0000 (15:41 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 21 Apr 2022 14:34:15 +0000 (16:34 +0200)
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

index 6a65d6923b4ae94f750d9fc518ec6f6990afdba3..31ef6d55601963594adf1c02ce499e289e62c8c4 100644 (file)
@@ -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);