diff options
author | Martin Ettl <ettl.martin@gmx.de> | 2010-02-21 03:31:44 -0500 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-07-02 07:51:11 -0400 |
commit | 5e8e1cc0a1c36c8ff156ac1f04a16422bd4ed3ac (patch) | |
tree | f2c489527d33e246c7d4d1f2cb979ea0c04a1e61 /scripts/dtc | |
parent | fbe3290f4558c72abf6e264c4a2ee708b0495d55 (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.c | 1 |
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) | |||
77 | free(tmpnam); | 77 | free(tmpnam); |
78 | } | 78 | } |
79 | 79 | ||
80 | closedir(d); | ||
80 | return tree; | 81 | return tree; |
81 | } | 82 | } |
82 | 83 | ||