public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch] Fix leak in usermode linux
@ 2009-10-12 13:07 Eric Sesterhenn
  2009-10-12 16:10 ` Américo Wang
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Sesterhenn @ 2009-10-12 13:07 UTC (permalink / raw)
  To: linux-kernel

hi,

this was spotted by cppcheck, if find_tempdir fails,
we dont free tempname.

Signed-off-by: Eric Sesterhenn <eric.sesterhenn@lsexperts.de>

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-12 16:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-12 13:07 [Patch] Fix leak in usermode linux Eric Sesterhenn
2009-10-12 16:10 ` Américo Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox