All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,lasse.collin@tukaani.org,skunkolee@gmail.com,akpm@linux-foundation.org
Subject: [merged mm-nonmm-stable] lib-decompress_unxz-make-it-obvious-that-there-is-no-memory-leak.patch removed from -mm tree
Date: Tue, 06 Oct 2026 19:04:33 -0700	[thread overview]
Message-ID: <20261007020434.2A5B91F0089C@smtp.kernel.org> (raw)


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



                 reply	other threads:[~2026-10-07  2:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261007020434.2A5B91F0089C@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=lasse.collin@tukaani.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=skunkolee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.