From 4bffea85798b0bf2d83cf863c912bdc6ea0de4cc Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Tue, 28 Apr 2026 11:02:23 +0200 Subject: [PATCH] BUG/MINOR: mux_quic: free frames emitted with QMux When using QUIC, mux instantiates quic_frame objects but does not free them. This is performed only when acknowledgment are received. This is not the case for QMux protocol, as the transport layer is much simpler in this case. As such, mux is responsible to free up the frames after emission. This patch fixes qcc_qstrm_send_frames() by adding the necessary qc_frm_free() calls as soon as a frame is emitted. This fixes a memory leak. This function ensures that the freed object is removed from its parent list, so LIST_DEL_INIT() is not necessary anymore. No need to backport. --- src/mux_quic_qstrm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mux_quic_qstrm.c b/src/mux_quic_qstrm.c index 68360cd09..7d53d7676 100644 --- a/src/mux_quic_qstrm.c +++ b/src/mux_quic_qstrm.c @@ -368,11 +368,12 @@ int qcc_qstrm_send_frames(struct qcc *qcc, struct list *frms) if (frm->type >= QUIC_FT_STREAM_8 && frm->type <= QUIC_FT_STREAM_F) qstrm_ctrl_send(frm->stream.stream, frm->stream.len); - LIST_DEL_INIT(&frm->list); if (split_frm) { + qc_frm_free(NULL, &split_frm); frm = next_frm; goto loop; } + qc_frm_free(NULL, &frm); } out: