From: Amaury Denoyelle Date: Mon, 21 Feb 2022 09:05:16 +0000 (+0100) Subject: MINOR: mux-quic: fix a possible null dereference in qc_timeout_task X-Git-Tag: v2.6-dev2~105 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ea3e0355dac6fdaa94f65ed46b553936f9add5bb;p=thirdparty%2Fhaproxy.git MINOR: mux-quic: fix a possible null dereference in qc_timeout_task The qcc instance should be tested as it is implied by a previous test that it may be NULL. In this case, qc_timeout_task can be stopped. This should fix github issue #1559. --- diff --git a/src/mux_quic.c b/src/mux_quic.c index 2ed269e3cb..c01fcbfa79 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -427,6 +427,10 @@ static struct task *qc_timeout_task(struct task *t, void *ctx, unsigned int stat fprintf(stderr, "%s: timeout\n", __func__); task_destroy(t); + + if (!qcc) + return NULL; + qcc->task = NULL; if (qcc_is_dead(qcc))