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.
This commit is contained in:
Willy Tarreau 2022-05-13 16:31:23 +02:00
parent 973cf90714
commit df94313e0e

View File

@ -1222,7 +1222,7 @@ static void qc_destroy(void *ctx)
static void qc_detach(struct cs_endpoint *endp) 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; struct qcc *qcc = qcs->qcc;
TRACE_ENTER(QMUX_EV_STRM_END, qcc->conn, qcs); TRACE_ENTER(QMUX_EV_STRM_END, qcc->conn, qcs);