]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: fix trace on releasing STREAM frame after ack
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 2 Oct 2024 15:04:19 +0000 (17:04 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 2 Oct 2024 15:10:51 +0000 (17:10 +0200)
Fix NULL argument pass to qc_release_frm(). This allows to give more
context on the traces inside it. Note that no crash occured as QUIC
traces always check validity on first arg before derefencing it.

No backport needed.

src/quic_stream.c

index 9d0b3ed8f11e063c611d9efeb563c1bdaf6f0d5f..e2b971c815548b8d10da5779dbdd5b228a944258 100644 (file)
@@ -178,6 +178,7 @@ static struct qc_stream_buf *qc_stream_buf_ack(struct qc_stream_buf *buf,
 static void qc_stream_buf_consume(struct qc_stream_buf *stream_buf,
                                   struct qc_stream_desc *stream)
 {
+       struct quic_conn *qc = stream->qc;
        struct eb64_node *frm_node;
        struct qf_stream *strm_frm;
        struct quic_frame *frm;
@@ -201,7 +202,7 @@ static void qc_stream_buf_consume(struct qc_stream_buf *stream_buf,
                 */
                eb64_delete(frm_node);
                stream_buf = qc_stream_buf_ack(stream_buf, stream, offset, len, fin);
-               qc_release_frm(NULL, frm);
+               qc_release_frm(qc, frm);
 
                frm_node = stream_buf ? eb64_first(&stream_buf->acked_frms) : NULL;
        }