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 <[email protected]>
Cc: David Gibson <[email protected]>
Signed-off-by: Michal Marek <[email protected]>
free(tmpnam);
}
+ closedir(d);
return tree;
}