From b930ff03d6fd826b50cb3743aa3546c8d568e6be Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Tue, 8 Aug 2023 10:47:11 +0200 Subject: [PATCH] MINOR: quic: Release asap quic_conn memory (application level) Add a check to the QUIC packet handler running at application level (after the handshake is complete) to release the quic_conn memory calling quic_conn_release(). This is done only if the mux is not started. --- src/quic_conn.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/quic_conn.c b/src/quic_conn.c index 3ed409f7a8..c0c128a462 100644 --- a/src/quic_conn.c +++ b/src/quic_conn.c @@ -743,6 +743,11 @@ struct task *quic_conn_app_io_cb(struct task *t, void *context, unsigned int sta } out: + if ((qc->flags & QUIC_FL_CONN_CLOSING) && qc->mux_state != QC_MUX_READY) { + quic_conn_release(qc); + qc = NULL; + } + TRACE_LEAVE(QUIC_EV_CONN_IO_CB, qc); return t; } -- 2.47.3