]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/mm/mkdirty: fix memory leak in test_uffdio_copy()
authorliuye <liuye@kylinos.cn>
Tue, 14 Jan 2025 02:38:38 +0000 (10:38 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 26 Jan 2025 04:22:45 +0000 (20:22 -0800)
commit7882d8fc8fe0c2b2a01f09e56edf82df6b3013fd
tree321c250c9156835a7e4aa495c7821f2dc0d6e8bf
parent92da98845a93dc408eaf999885f62f276c91754a
selftests/mm/mkdirty: fix memory leak in test_uffdio_copy()

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@kylinos.cn
Signed-off-by: liuye <liuye@kylinos.cn>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/mkdirty.c