From 75e36c57f068ee516d54e44dd901c3a7e9383076 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Fri, 10 Nov 2023 15:23:58 +0100 Subject: [PATCH] BUG/MINOR: quic: remove dead code in error path In quic_rx_pkt_retrieve_conn(), err label is now only used if qc is NULL. Thus, condition on qc can be removed. No need to backport. This issue was reported by coverity on github. This should fix issue #2338. --- src/quic_rx.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/quic_rx.c b/src/quic_rx.c index d25f7ccfe..336e820e6 100644 --- a/src/quic_rx.c +++ b/src/quic_rx.c @@ -2063,10 +2063,7 @@ static struct quic_conn *quic_rx_pkt_retrieve_conn(struct quic_rx_packet *pkt, return qc; err: - if (qc) - qc->cntrs.dropped_pkt++; - else - HA_ATOMIC_INC(&prx_counters->dropped_pkt); + HA_ATOMIC_INC(&prx_counters->dropped_pkt); TRACE_LEAVE(QUIC_EV_CONN_LPKT); return NULL;