From: Martin Ettl Date: Sun, 21 Feb 2010 08:31:44 +0000 (+0100) Subject: scripts/dtc: Fix a resource leak X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5e8e1cc0a1c36c8ff156ac1f04a16422bd4ed3ac;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: David Gibson Signed-off-by: Michal Marek --- 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; }