Commit c0aab59f67ef47e52d151464c8dd16e7ae58d053

Authored by Arnaldo Carvalho de Melo
1 parent 56ab714032

perf tests: Call machine__exit in the vmlinux matches kallsyms test

Removing leaks with valgrind.

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-x9hja7wxwexe8ca9v2j8qtlg@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff

tools/perf/tests/vmlinux-kallsyms.c
... ... @@ -44,7 +44,7 @@
44 44 */
45 45 if (machine__create_kernel_maps(&kallsyms) < 0) {
46 46 pr_debug("machine__create_kernel_maps ");
47   - return -1;
  47 + goto out;
48 48 }
49 49  
50 50 /*
... ... @@ -227,6 +227,8 @@
227 227 map__fprintf(pos, stderr);
228 228 }
229 229 out:
  230 + machine__exit(&kallsyms);
  231 + machine__exit(&vmlinux);
230 232 return err;
231 233 }