From: Amaury Denoyelle Date: Thu, 23 Dec 2021 15:27:56 +0000 (+0100) Subject: BUG/MINOR: quic: fix potential null dereference X-Git-Tag: v2.6-dev1~222 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6fab98f9b6a9c3d416145cee9cb31f1882d6add;p=thirdparty%2Fhaproxy.git BUG/MINOR: quic: fix potential null dereference This is not a real issue because found_in_dcid can not be set if qc is NULL. --- diff --git a/src/xprt_quic.c b/src/xprt_quic.c index 04b4bba908..f486ebad83 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -3923,7 +3923,7 @@ static struct quic_conn *retrieve_qc_conn_from_cid(struct quic_rx_packet *pkt, * * node.leaf_p is first checked to avoid unnecessary locking. */ - if (found_in_dcid && qc->odcid_node.node.leaf_p) { + if (qc && found_in_dcid && qc->odcid_node.node.leaf_p) { HA_RWLOCK_WRLOCK(QUIC_LOCK, &l->rx.cids_lock); ebmb_delete(&qc->odcid_node); HA_RWLOCK_WRUNLOCK(QUIC_LOCK, &l->rx.cids_lock);