[merged mm-stable] selftests-mm-mkdirty-fix-memory-leak-in-test_uffdio_copy.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The quilt patch titled
     Subject: selftests/mm/mkdirty: fix memory leak in test_uffdio_copy()
has been removed from the -mm tree.  Its filename was
     selftests-mm-mkdirty-fix-memory-leak-in-test_uffdio_copy.patch

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

------------------------------------------------------
From: liuye <liuye@xxxxxxxxxx>
Subject: selftests/mm/mkdirty: fix memory leak in test_uffdio_copy()
Date: Tue, 14 Jan 2025 10:38:38 +0800

Release memory before exception branch returns to prevent memory leaks

Checking tools/testing/selftests/mm/mkdirty.c ...
tools/testing/selftests/mm/mkdirty.c:283:3: error: Memory leak: src [memleak]
  return;
  ^

Link: https://lkml.kernel.org/r/20250114023838.48589-1-liuye@xxxxxxxxxx
Signed-off-by: liuye <liuye@xxxxxxxxxx>
Reviewed-by: David Hildenbrand <david@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 tools/testing/selftests/mm/mkdirty.c |    1 +
 1 file changed, 1 insertion(+)

--- a/tools/testing/selftests/mm/mkdirty.c~selftests-mm-mkdirty-fix-memory-leak-in-test_uffdio_copy
+++ a/tools/testing/selftests/mm/mkdirty.c
@@ -280,6 +280,7 @@ static void test_uffdio_copy(void)
 	dst = mmap(NULL, pagesize, PROT_READ, MAP_PRIVATE|MAP_ANON, -1, 0);
 	if (dst == MAP_FAILED) {
 		ksft_test_result_fail("mmap() failed\n");
+		free(src);
 		return;
 	}
 
_

Patches currently in -mm which might be from liuye@xxxxxxxxxx are

mm-vmscan-fix-hard-lockup-in-function-isolate_lru_folios.patch





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux