All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/page_owner: Fix memory leak
@ 2015-01-16 12:11 Valentin Ilie
  2015-01-16 15:03 ` Paul Bolle
  0 siblings, 1 reply; 4+ messages in thread
From: Valentin Ilie @ 2015-01-16 12:11 UTC (permalink / raw)
  To: iamjoonsoo.kim, akpm, linux-kernel; +Cc: Valentin Ilie

Call kfree on list2 after using it.

Signed-off-by: Valentin Ilie <valentin.ilie@gmail.com>
---
 tools/vm/page_owner_sort.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/vm/page_owner_sort.c b/tools/vm/page_owner_sort.c
index 77147b4..92292d5 100644
--- a/tools/vm/page_owner_sort.c
+++ b/tools/vm/page_owner_sort.c
@@ -139,6 +139,8 @@ int main(int argc, char **argv)
 
 	for (i = 0; i < count; i++)
 		fprintf(fout, "%d times:\n%s\n", list2[i].num, list2[i].txt);
+	
+	kfree(list2);
 
 	return 0;
 }
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-16 15:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-16 12:11 [PATCH] mm/page_owner: Fix memory leak Valentin Ilie
2015-01-16 15:03 ` Paul Bolle
2015-01-16 15:30   ` Paul Bolle
2015-01-16 15:37     ` Valentin Ilie

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.