From: Frédéric Lécaille Date: Tue, 8 Aug 2023 08:47:11 +0000 (+0200) Subject: MINOR: quic: Release asap quic_conn memory (application level) X-Git-Tag: v2.9-dev3~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b930ff03d6fd826b50cb3743aa3546c8d568e6be;p=thirdparty%2Fhaproxy.git 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. --- 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; }