diff --git a/src/mux_quic.c b/src/mux_quic.c index 9357145ef..8cb2759e4 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -2464,13 +2464,6 @@ static void qcc_release(struct qcc *qcc) qcc->task = NULL; } - 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); while (node) { @@ -2479,6 +2472,13 @@ static void qcc_release(struct qcc *qcc) qcs_free(qcs); } + 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); + } + while (!LIST_ISEMPTY(&qcc->lfctl.frms)) { struct quic_frame *frm = LIST_ELEM(qcc->lfctl.frms.n, struct quic_frame *, list); qc_frm_free(qcc->conn->handle.qc, &frm);