All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-nonmm-stable] lib-decompress_unxz-make-it-obvious-that-there-is-no-memory-leak.patch removed from -mm tree
@ 2026-10-07  2:04 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-10-07  2:04 UTC (permalink / raw)
  To: mm-commits, lasse.collin, skunkolee, akpm


The quilt patch titled
     Subject: lib: decompress_unxz: make it obvious that there is no memory leak
has been removed from the -mm tree.  Its filename was
     lib-decompress_unxz-make-it-obvious-that-there-is-no-memory-leak.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Ivy Lopez <skunkolee@gmail.com>
Subject: lib: decompress_unxz: make it obvious that there is no memory leak
Date: Mon, 31 Aug 2026 19:41:38 -0600

Calling __decompress() or unxz() with fill == NULL && flush == NULL && in
== NULL is invalid, thus there were no memory leaks even though it might
have looked like that.  Move the conditional free() calls so that it's
obvious that there are no leaks.

Link: https://lore.kernel.org/20260901014138.22699-1-skunkolee@gmail.com
Link: https://lore.kernel.org/lkml/20241006072542.66442-2-t.v.s10123@gmail.com/T/
Link: https://lore.kernel.org/lkml/20260825191333.34276-1-skunkolee@gmail.com/T/
Signed-off-by: Ivy Lopez <skunkolee@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=207113
Reviewed-by: Lasse Collin <lasse.collin@tukaani.org>
---

 lib/decompress_unxz.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

--- a/lib/decompress_unxz.c~lib-decompress_unxz-make-it-obvious-that-there-is-no-memory-leak
+++ a/lib/decompress_unxz.c
@@ -342,13 +342,13 @@ STATIC int INIT unxz(unsigned char *in,
 				b.out_pos = 0;
 			}
 		} while (ret == XZ_OK);
+	}
 
-		if (must_free_in)
-			free(in);
+	if (must_free_in)
+		free(in);
 
-		if (flush != NULL)
-			free(b.out);
-	}
+	if (flush != NULL)
+		free(b.out);
 
 	if (in_used != NULL)
 		*in_used += b.in_pos;
_

Patches currently in -mm which might be from skunkolee@gmail.com are



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-07  2:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-07  2:04 [merged mm-nonmm-stable] lib-decompress_unxz-make-it-obvious-that-there-is-no-memory-leak.patch removed from -mm tree 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.