Bug 14357 - found a resource leak in file scripts/fstree.c
Summary: found a resource leak in file scripts/fstree.c
Status: CLOSED OBSOLETE
Alias: None
Product: Other
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: other_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-10 10:21 UTC by Martin Ettl
Modified: 2012-06-13 19:44 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.31
Subsystem:
Regression: No
Bisected commit-id:


Attachments
patch to fix the resource leak (443 bytes, patch)
2009-10-10 10:21 UTC, Martin Ettl
Details | Diff

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.

Note You need to log in before you can comment on or make changes to this bug.