Bug 14357

Summary: found a resource leak in file scripts/fstree.c
Product: Other Reporter: Martin Ettl (ettl.martin)
Component: OtherAssignee: other_other
Status: CLOSED OBSOLETE    
Severity: normal CC: alan, randy.dunlap
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.31 Subsystem:
Regression: No Bisected commit-id:
Attachments: patch to fix the resource leak

Description Martin Ettl 2009-10-10 10:21:29 UTC
Created attachment 23326 [details]
patch to fix the resource leak

Hello,

during the check with the static code analysis tool cppcheck (available on soureforge), i found a resource leak in file scripts/fstree.c. See the attached patch, the fixes this issue.

Best regards

Martin
Comment 1 Randy Dunlap 2009-10-10 15:42:42 UTC
+	if (!d)

shouldn't that be:

+	if (d)
Comment 2 Martin Ettl 2009-10-10 16:12:19 UTC
Oh, yes you are right!


-------- Original-Nachricht --------
> Datum: Sat, 10 Oct 2009 15:42:43 GMT
> Von: bugzilla-daemon@bugzilla.kernel.org
> An: ettl.martin@gmx.de
> Betreff: [Bug 14357] found a resource leak in file scripts/fstree.c

> http://bugzilla.kernel.org/show_bug.cgi?id=14357
> 
> 
> Randy Dunlap <randy.dunlap@oracle.com> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |randy.dunlap@oracle.com
> 
> 
> 
> 
> --- Comment #1 from Randy Dunlap <randy.dunlap@oracle.com>  2009-10-10
> 15:42:42 ---
> +    if (!d)
> 
> shouldn't that be:
> 
> +    if (d)
> 
> -- 
> Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You reported the bug.