mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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:03:41 +0100	[thread overview]
Message-ID: <1421420621.8562.1.camel@x220> (raw)
In-Reply-To: <1421410284-23776-1-git-send-email-valentin.ilie@gmail.com>

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;
>  }

Thanks,


Paul Bolle


  reply	other threads:[~2015-01-16 15:03 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 [this message]
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=1421420621.8562.1.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®