]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: TX frames memleak
authorFrédéric Lécaille <flecaille@haproxy.com>
Wed, 31 Aug 2022 13:02:53 +0000 (15:02 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 31 Aug 2022 13:20:29 +0000 (15:20 +0200)
Missing call to pool_free() for quic_frame objects

Must be backported to 2.6.

src/xprt_quic.c

index 399b3e38f14c935a034e2aa724da51e7beb54b88..2ed8adbecf5aecf51f118ac315d5756152dbefd5 100644 (file)
@@ -1764,6 +1764,7 @@ static inline void qc_requeue_nacked_pkt_tx_frms(struct quic_conn *qc,
                        if (strm_frm->offset.key + strm_frm->len <= stream_desc->ack_offset) {
                                TRACE_DEVEL("ignored frame in already acked range",
                                            QUIC_EV_CONN_PRSAFRM, qc, frm);
+                               pool_free(pool_head_quic_frame, frm);
                                continue;
                        }
                        else if (strm_frm->offset.key < stream_desc->ack_offset) {
@@ -3424,6 +3425,7 @@ static int quic_build_post_handshake_frames(struct quic_conn *qc)
                LIST_INIT(&frm->reflist);
                cid = new_quic_cid(&qc->cids, qc, i);
                if (!cid) {
+                       pool_free(pool_head_quic_frame, frm);
                        TRACE_ERROR("CID allocation error", QUIC_EV_CONN_IO_CB, qc);
                        goto err;
                }