From df94313e0e9155eddc48f13c1a32855e50699cef Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 13 May 2022 16:31:23 +0200 Subject: [PATCH] BUG/MEDIUM: mux-quic: fix a thinko in the latest cs/endpoint cleanup Fred & Amaury found that I messed up with qc_detach() in commit 4201ab791 ("CLEANUP: muxes: make mux->attach/detach take a conn_stream endpoint"), causing a segv in this case with endp->cs == NULL being passed to __cs_mux(). It obviously ought to have been endp->target like in other muxes. No backport needed. --- src/mux_quic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mux_quic.c b/src/mux_quic.c index 8c9c051e0..bc8910c1e 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -1222,7 +1222,7 @@ static void qc_destroy(void *ctx) static void qc_detach(struct cs_endpoint *endp) { - struct qcs *qcs = __cs_mux(endp->cs); + struct qcs *qcs = endp->target; struct qcc *qcc = qcs->qcc; TRACE_ENTER(QMUX_EV_STRM_END, qcc->conn, qcs);