* + lib-inflate-fix-memory-leak-in-inflate_fixed-on-inflate_codes-failure.patch added to mm-nonmm-unstable branch
@ 2026-03-06 18:05 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-03-06 18:05 UTC (permalink / raw)
To: mm-commits, objecting, akpm, hlcj1234567, akpm
The patch titled
Subject: lib/inflate: fix memory leak in inflate_fixed() on inflate_codes() failure
has been added to the -mm mm-nonmm-unstable branch. Its filename is
lib-inflate-fix-memory-leak-in-inflate_fixed-on-inflate_codes-failure.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/lib-inflate-fix-memory-leak-in-inflate_fixed-on-inflate_codes-failure.patch
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: Josh Law <hlcj1234567@gmail.com>
Subject: lib/inflate: fix memory leak in inflate_fixed() on inflate_codes() failure
Date: Fri, 6 Mar 2026 16:16:12 +0000
When inflate_codes() fails in inflate_fixed(), only the length list 'l' is
freed, but the Huffman tables 'tl' and 'td' are leaked. Add the missing
huft_free() calls on the error path.
Link: https://lkml.kernel.org/r/20260306161612.2811703-1-objecting@objecting.org
Signed-off-by: Josh Law <objecting@objecting.org>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
lib/inflate.c | 2 ++
1 file changed, 2 insertions(+)
--- a/lib/inflate.c~lib-inflate-fix-memory-leak-in-inflate_fixed-on-inflate_codes-failure
+++ a/lib/inflate.c
@@ -811,6 +811,8 @@ DEBG("<fix");
/* decompress until an end-of-block code */
if (inflate_codes(tl, td, bl, bd)) {
+ huft_free(tl);
+ huft_free(td);
free(l);
return 1;
}
_
Patches currently in -mm which might be from hlcj1234567@gmail.com are
lib-glob-add-missing-spdx-license-identifier.patch
lib-uuid-fix-typo-reversion-to-revision-in-comment.patch
lib-inflate-fix-memory-leak-in-inflate_fixed-on-inflate_codes-failure.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-03-06 18:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-06 18:05 + lib-inflate-fix-memory-leak-in-inflate_fixed-on-inflate_codes-failure.patch added to mm-nonmm-unstable branch Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.