public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Américo Wang" <xiyou.wangcong@gmail.com>
To: Alexander Beregalov <a.beregalov@gmail.com>
Cc: jdike@addtoit.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] uml: fix memory leak in arch/um/os-Linux/mem.c
Date: Sun, 10 Jan 2010 16:12:55 +0800	[thread overview]
Message-ID: <20100110081255.GB3005@hack> (raw)
In-Reply-To: <1263057984-12487-1-git-send-email-a.beregalov@gmail.com>

On Sat, Jan 09, 2010 at 08:26:24PM +0300, Alexander Beregalov wrote:
>Free tempname before exit.
>Found by cppcheck.
>
>Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>

Acked-by: WANG Cong <xiyou.wangcong@gmail.com>

Thanks!

>---
> arch/um/os-Linux/mem.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>diff --git a/arch/um/os-Linux/mem.c b/arch/um/os-Linux/mem.c
>index 93a11d7..f079ea0 100644
>--- a/arch/um/os-Linux/mem.c
>+++ b/arch/um/os-Linux/mem.c
>@@ -175,7 +175,7 @@ static int __init make_tempfile(const char *template, char **out_tempname,
> 
> 	find_tempdir();
> 	if ((tempdir == NULL) || (strlen(tempdir) >= MAXPATHLEN))
>-		return -1;
>+		goto out;
> 
> 	if (template[0] != '/')
> 		strcpy(tempname, tempdir);
>-- 
>1.6.6
>
>--
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at  http://www.tux.org/lkml/

-- 
Live like a child, think like the god.
 

      reply	other threads:[~2010-01-10  8:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-09 17:26 [PATCH] uml: fix memory leak in arch/um/os-Linux/mem.c Alexander Beregalov
2010-01-10  8:12 ` Américo Wang [this message]

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=20100110081255.GB3005@hack \
    --to=xiyou.wangcong@gmail.com \
    --cc=a.beregalov@gmail.com \
    --cc=jdike@addtoit.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