Fix leak in usermode linux
PATCH 1/1 Fix leak in usermode linux
hi,
this was spotted by cppcheck, if find_tempdir fails, we dont free tempname.
Signed-off-by Eric Sesterhenn <[email protected]>
arch/um/os-Linux/mem.c renamed from arch/um/os-Linux/mem.c.orig +1 -1
@@ -175,7 +175,7 @@ static int __init make_tempfile(const chfind_tempdir ();if ((tempdir ==NULL ) || (strlen (tempdir) >=MAXPATHLEN )) -return -1 ; + goto out;if (template[0 ] !='/' )strcpy (tempname, tempdir);
Signature · 3 lines
LSE Leading Security Experts GmbH, Postfach 100121, 64201 Darmstadt Unternehmenssitz: Weiterstadt, Amtsgericht Darmstadt: HRB8649 Geschäftsführer: Oliver Michel, Sven Walther
Quoted 6 lines · Eric Sesterhenn
hi,
this was spotted by cppcheck, if
find_tempdirfails, we dont free tempname.Signed-off-by Eric Sesterhenn <[email protected]>
Acked-by WANG Cong <[email protected]>
Thanks!
Quoted 23 lines
arch/um/os-Linux/mem.c renamed from arch/um/os-Linux/mem.c.orig +1
-1@@ -175,7 +175,7 @@ static int __init make_tempfile(const chfind_tempdir ();if ((tempdir ==NULL ) || (strlen (tempdir) >=MAXPATHLEN )) -return -1 ; + goto out;if (template[0 ] !='/' )strcpy (tempname, tempdir);Signature · 10 lines
-- 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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Signature · 1 line
Live like a child, think like the god.