lkml.org 
[lkml]   [2009]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch] Fix leak in usermode linux
On Mon, Oct 12, 2009 at 03:07:32PM +0200, Eric Sesterhenn wrote:
>hi,
>
>this was spotted by cppcheck, if find_tempdir fails,
>we dont free tempname.
>
>Signed-off-by: Eric Sesterhenn <eric.sesterhenn@lsexperts.de>

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

Thanks!


>
>--- linux/arch/um/os-Linux/mem.c.orig 2009-10-12 15:04:28.000000000 +0200
>+++ linux/arch/um/os-Linux/mem.c 2009-10-12 15:04:37.000000000 +0200
>@@ -175,7 +175,7 @@ static int __init make_tempfile(const ch
>
> find_tempdir();
> if ((tempdir == NULL) || (strlen(tempdir) >= MAXPATHLEN))
>- return -1;
>+ goto out;
>
> if (template[0] != '/')
> strcpy(tempname, tempdir);
>
>--
>LSE Leading Security Experts GmbH, Postfach 100121, 64201 Darmstadt
>Unternehmenssitz: Weiterstadt, Amtsgericht Darmstadt: HRB8649
>Geschäftsführer: Oliver Michel, Sven Walther
>
>--
>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.

--
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/

\
 
 \ /
  Last update: 2009-10-12 18:19    [W:0.282 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site