[PATCH 4/8] perf kmem: Add missing closedir() calls

From: Namhyung Kim
Date: Sat Jan 07 2012 - 12:27:07 EST


The setup_cpunode_map() calls opendir() but misses corresponding
closedir(). Add them.

Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxx>
---
tools/perf/builtin-kmem.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index fe1ad8f21961..7a9b5c55ad5a 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -108,7 +108,9 @@ static void setup_cpunode_map(void)
continue;
cpunode_map[cpu] = mem;
}
+ closedir(dir2);
}
+ closedir(dir1);
}

static void insert_alloc_stat(unsigned long call_site, unsigned long ptr,
--
1.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/