Skip to content

Commit

Permalink
scripts/dtc: Fix a resource leak
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Martin Ettl authored and Michal Marek committed Jul 2, 2010
1 parent fbe3290 commit 5e8e1cc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/dtc/fstree.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ static struct node *read_fstree(const char *dirname)
free(tmpnam);
}

closedir(d);
return tree;
}

Expand Down

0 comments on commit 5e8e1cc

Please sign in to comment.