Fix a filehandle leak
A message that is not in the archive (sent off-list or not yet received): 20100714061056.GE23242@yookeroo
Quoted 43 lines
From: Martin Ettl <[email protected]>
During a check of the current git head of the linux kernel with the static code analysis tool cppcheck
(http://sourceforge.net/apps/mediawiki/cppcheck/index.php?title=Main_Page)
the tool discovered a resource leak inlinux-2.6/scripts/dtc/fstree.c.Please refer the attached patch, that fixes the issue.
Fixes https://bugzilla.kernel.org/show_bug.cgi?id=15363
Signed-off-by Martin Ettl <[email protected]>Signed-off-by Michal Marek <[email protected]>Signed-off-by David Gibson <[email protected]>---
Jon, please apply.
scripts/dtc/fstree.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)scripts/dtc/fstree.c +1
-0@@ -77,6 +77,7 @@ static struct node *read_fstree(const char *dirname)free (tmpnam); } +closedir (d);return tree; }Signature · 8 lines
1.7.1 -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _ot her_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Applied -p 3.
jdl
A message that is not in the archive (sent off-list or not yet received): E1OZAUM-0007wJ-A8-CYoMK+44s/[email protected]
Quoted 1 line · Jon Loeliger
Quoted 1 line
From: Martin Ettl <[email protected]>
[snip]
Quoted 2 lines
Applied -p 3.
Ugh, sorry. Meant to mangle the patch to apply directly to the dtc tree, but I forgot.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Quoted 8 lines · Jon Loeliger
Quoted 1 line
Quoted 1 line
From: Martin Ettl <[email protected]>
[snip]
Quoted 2 lines
Applied -p 3.
Ugh, sorry. Meant to mangle the patch to apply directly to the dtc tree, but I forgot.
No worries.
jdl