summaryrefslogtreecommitdiff
path: root/scripts/dtc
diff options
context:
space:
mode:
authorMartin Ettl <ettl.martin@gmx.de>2010-02-21 09:31:44 +0100
committerMichal Marek <mmarek@suse.cz>2010-07-02 13:51:11 +0200
commit5e8e1cc0a1c36c8ff156ac1f04a16422bd4ed3ac (patch)
treef2c489527d33e246c7d4d1f2cb979ea0c04a1e61 /scripts/dtc
parentfbe3290f4558c72abf6e264c4a2ee708b0495d55 (diff)
scripts/dtc: Fix a resource leak
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 in linux-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 <ettl.martin@gmx.de> Cc: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/dtc')
-rw-r--r--scripts/dtc/fstree.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/dtc/fstree.c b/scripts/dtc/fstree.c
index 766b2694d935..8fe1bdf239f0 100644
--- a/scripts/dtc/fstree.c
+++ b/scripts/dtc/fstree.c
@@ -77,6 +77,7 @@ static struct node *read_fstree(const char *dirname)
free(tmpnam);
}
+ closedir(d);
return tree;
}