]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: remove dead code in error path
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 10 Nov 2023 14:23:58 +0000 (15:23 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 10 Nov 2023 14:26:03 +0000 (15:26 +0100)
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

index d25f7ccfedfe00a05e6d406b9b66483e4565af5e..336e820e635766e513a6c12a8370499bbe299ade 100644 (file)
@@ -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;