From: Frederic Lecaille Date: Tue, 19 May 2026 15:06:08 +0000 (+0200) Subject: BUG/MINOR: quic: Fix memory leak in quic_deallocate_dghdlrs() X-Git-Tag: v3.4.0~76 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=9a39e55dedbfbd299a01d2af65a37b491a77ab0b;p=thirdparty%2Fhaproxy.git BUG/MINOR: quic: Fix memory leak in quic_deallocate_dghdlrs() When deallocating the QUIC datagram handlers, the per-thread buffer allocated inside quic_dghdlrs[i].buf.buffer was missing a free(). This led to a memory leak on exit or reload. Fix this by freeing each thread buffer before releasing the main quic_dghdlrs array. --- diff --git a/src/proto_quic.c b/src/proto_quic.c index fb606e323..4becdea32 100644 --- a/src/proto_quic.c +++ b/src/proto_quic.c @@ -625,8 +625,10 @@ static int quic_deallocate_dghdlrs(void) int i; if (quic_dghdlrs) { - for (i = 0; i < global.nbthread; ++i) + for (i = 0; i < global.nbthread; ++i) { + free(quic_dghdlrs[i].buf.buffer); tasklet_free(quic_dghdlrs[i].task); + } free(quic_dghdlrs); }