From: Valentin Ilie <valentin.ilie@gmail.com>
To: iamjoonsoo.kim@lge.com, akpm@linux-foundation.org,
linux-kernel@vger.kernel.org
Cc: Valentin Ilie <valentin.ilie@gmail.com>
Subject: [PATCH] mm/page_owner: Fix memory leak
Date: Fri, 16 Jan 2015 14:11:24 +0200 [thread overview]
Message-ID: <1421410284-23776-1-git-send-email-valentin.ilie@gmail.com> (raw)
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
next reply other threads:[~2015-01-16 12:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-16 12:11 Valentin Ilie [this message]
2015-01-16 15:03 ` Paul Bolle
2015-01-16 15:30 ` Paul Bolle
2015-01-16 15:37 ` Valentin Ilie
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=1421410284-23776-1-git-send-email-valentin.ilie@gmail.com \
--to=valentin.ilie@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®