From: Arnaldo Carvalho de Melo Date: Fri, 25 Jan 2013 02:01:50 +0000 (-0300) Subject: perf tests: Call machine__exit in the vmlinux matches kallsyms test X-Git-Tag: MMI-PSA29.97-13-9~15047^2~12^2~13 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c0aab59f67ef47e52d151464c8dd16e7ae58d053;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git perf tests: Call machine__exit in the vmlinux matches kallsyms test Removing leaks with valgrind. Cc: David Ahern Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Mike Galbraith Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-x9hja7wxwexe8ca9v2j8qtlg@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/tests/vmlinux-kallsyms.c b/tools/perf/tests/vmlinux-kallsyms.c index a1a8442829b4..7b4c4d26d1ba 100644 --- a/tools/perf/tests/vmlinux-kallsyms.c +++ b/tools/perf/tests/vmlinux-kallsyms.c @@ -44,7 +44,7 @@ int test__vmlinux_matches_kallsyms(void) */ if (machine__create_kernel_maps(&kallsyms) < 0) { pr_debug("machine__create_kernel_maps "); - return -1; + goto out; } /* @@ -227,5 +227,7 @@ detour: map__fprintf(pos, stderr); } out: + machine__exit(&kallsyms); + machine__exit(&vmlinux); return err; }