From: Paul Bolle <pebolle@tiscali.nl>
To: Valentin Ilie <valentin.ilie@gmail.com>
Cc: iamjoonsoo.kim@lge.com, akpm@linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/page_owner: Fix memory leak
Date: Fri, 16 Jan 2015 16:30:53 +0100 [thread overview]
Message-ID: <1421422253.8562.8.camel@x220> (raw)
In-Reply-To: <1421420621.8562.1.camel@x220>
(I dislike it when people set a trap for me, so on second thought I tell
you what I should have added right away.)
On Fri, 2015-01-16 at 16:03 +0100, Paul Bolle wrote:
> On Fri, 2015-01-16 at 14:11 +0200, Valentin Ilie wrote:
> > 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);
> > +
>
> Checkpatch would have caught the tab you added here.
>
> > + kfree(list2);
>
> You didn't even compile this, did you?
>
> > return 0;
> > }
Before you resend: what happens to the resources of a userspace program
when its main() returns?
Paul Bolle
next prev parent reply other threads:[~2015-01-16 15:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-16 12:11 Valentin Ilie
2015-01-16 15:03 ` Paul Bolle
2015-01-16 15:30 ` Paul Bolle [this message]
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=1421422253.8562.8.camel@x220 \
--to=pebolle@tiscali.nl \
--cc=akpm@linux-foundation.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=valentin.ilie@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 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®