perf kmem: Add missing closedir() calls
authorNamhyung Kim <namhyung@gmail.com>
Sat, 7 Jan 2012 17:25:28 +0000 (02:25 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sun, 8 Jan 2012 15:27:06 +0000 (13:27 -0200)
The setup_cpunode_map() calls opendir() but misses corresponding
closedir(). Add them.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1325957132-10600-4-git-send-email-namhyung@gmail.com
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-kmem.c

index fe1ad8f21961512a6a81e5f5670de71fcc9a2279..7a9b5c55ad5af26dffbecd7631eb0addf4726196 100644 (file)
@@ -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,