From: Amaury Denoyelle Date: Wed, 19 Apr 2023 08:45:40 +0000 (+0200) Subject: BUG/MINOR: quic: prevent crash on qc_new_conn() failure X-Git-Tag: v2.8-dev8~75 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d537ca79dc6d4f3047a4c8e6b6d14a1cc0e4a31e;p=thirdparty%2Fhaproxy.git BUG/MINOR: quic: prevent crash on qc_new_conn() failure Properly initialize el_th_ctx member first on qc_new_conn(). This prevents a segfault if release should be called later due to memory allocation failure in the function on qc_detach_th_ctx_list(). This should be backported up to 2.7. --- diff --git a/src/quic_conn.c b/src/quic_conn.c index ca7de95102..8a0647405c 100644 --- a/src/quic_conn.c +++ b/src/quic_conn.c @@ -5471,6 +5471,7 @@ static struct quic_conn *qc_new_conn(const struct quic_version *qv, int ipv4, qc_init_fd(qc); LIST_INIT(&qc->back_refs); + LIST_INIT(&qc->el_th_ctx); /* Now proceeds to allocation of qc members. */