From: Willy Tarreau Date: Fri, 13 May 2022 14:31:23 +0000 (+0200) Subject: BUG/MEDIUM: mux-quic: fix a thinko in the latest cs/endpoint cleanup X-Git-Tag: v2.6-dev10~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=df94313e0e9155eddc48f13c1a32855e50699cef;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/mux_quic.c b/src/mux_quic.c index 8c9c051e0f..bc8910c1e1 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);