From f3edbc792e41ce7d43ed267ca976fdf746a799c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Thu, 10 Aug 2023 17:21:19 +0200 Subject: [PATCH] BUG/MINOR: quic: Possible crash in quic_cc_conn_io_cb() traces. Reset the local cc_qc and qc after having released cc_qc. Note that cc_qc == qc. This is required to prevent haproxy from crashing when TRACE_LEAVE() is called. No need to backport. --- src/quic_conn.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/quic_conn.c b/src/quic_conn.c index ba4ab5ce9..6751b360e 100644 --- a/src/quic_conn.c +++ b/src/quic_conn.c @@ -798,6 +798,8 @@ static struct task *quic_cc_conn_io_cb(struct task *t, void *context, unsigned i if (qc_snd_buf(qc, &buf, buf.data, 0) < 0) { TRACE_ERROR("sendto fatal error", QUIC_EV_CONN_IO_CB, qc); quic_release_cc_conn(cc_qc); + cc_qc = NULL; + qc = NULL; goto leave; }