diff options
author | Martin Ettl <ettl.martin@gmx.de> | 2010-07-14 16:10:56 +1000 |
---|---|---|
committer | Jon Loeliger <jdl@jdl.com> | 2010-07-14 17:29:19 -0500 |
commit | 0e89e8c5a02eab5655f21e732c8f2ff145712ba8 (patch) | |
tree | 3f096dae14354e693b83ece25429f1549c3b6838 | |
parent | e3b32b75b54834bc4d55db22636b6504eabb788e (diff) | |
download | dtc-0e89e8c5a02eab5655f21e732c8f2ff145712ba8.tar.gz |
Fix a filehandle 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>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r-- | fstree.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -75,6 +75,7 @@ static struct node *read_fstree(const char *dirname) free(tmpnam); } + closedir(d); return tree; } |