From: Willy Tarreau Date: Tue, 1 Dec 2026 10:52:40 +0000 (+0100) Subject: BUILD: mux-quic: silence an invalid null-deref warning at -O1 X-Git-Url: https://git.kaiwu.me/web/%7B@url%7D?a=commitdiff_plain;h=61261c539ac4992d6286b5a4bad57fe6cf3681d4;p=haproxy.git BUILD: mux-quic: silence an invalid null-deref warning at -O1 It's just because it sees that qcs_sc(qcs) can return a NULL, but on the second call it forgets it just tested it, as usual. Let's pass it via a local variable. --- diff --git a/src/mux_quic.c b/src/mux_quic.c index 2c9179928..2bf53659f 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -581,9 +581,11 @@ static struct ncbuf *qcs_get_ncbuf(struct qcs *qcs, struct ncbuf *ncbuf) static void qcs_alert(struct qcs *qcs) { unsigned int state = TASK_WOKEN_MSG; + const struct stconn *sc; TRACE_POINT(QMUX_EV_STRM_WAKE, qcs->qcc->conn, qcs); - if (!qcs_sc(qcs)) + sc = qcs_sc(qcs); + if (!sc) return; if (qcs->subs) { @@ -591,7 +593,7 @@ static void qcs_alert(struct qcs *qcs) qcs->subs = NULL; state |= TASK_WOKEN_IO; } - tasklet_wakeup(qcs_sc(qcs)->wait_event.tasklet, state); + tasklet_wakeup(sc->wait_event.tasklet, state); } int qcs_subscribe(struct qcs *qcs, int event_type, struct wait_event *es)