diff options
author | Namhyung Kim <[email protected]> | 2013-03-15 14:48:52 +0900 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2013-03-15 13:06:12 -0300 |
commit | 9b5b7cdc5139fdcc30ee56d9cd162da60453f6d8 (patch) | |
tree | 859274741ed96cc4eb386a4089c403b2993de4c8 | |
parent | 8fa60e1fbaecd2e652abe41f68a934c1759663f3 (diff) |
perf tests: Fixup return path of open-syscall-tp-fields test case
Add missing evlist cleanup functions.
Signed-off-by: Namhyung Kim <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r-- | tools/perf/tests/open-syscall-tp-fields.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/perf/tests/open-syscall-tp-fields.c b/tools/perf/tests/open-syscall-tp-fields.c index 02cb74174e23..fc5b9fca8b47 100644 --- a/tools/perf/tests/open-syscall-tp-fields.c +++ b/tools/perf/tests/open-syscall-tp-fields.c @@ -48,13 +48,13 @@ int test__syscall_open_tp_fields(void) err = perf_evlist__open(evlist); if (err < 0) { pr_debug("perf_evlist__open: %s\n", strerror(errno)); - goto out_delete_evlist; + goto out_delete_maps; } err = perf_evlist__mmap(evlist, UINT_MAX, false); if (err < 0) { pr_debug("perf_evlist__mmap: %s\n", strerror(errno)); - goto out_delete_evlist; + goto out_close_evlist; } perf_evlist__enable(evlist); @@ -110,6 +110,10 @@ out_ok: err = 0; out_munmap: perf_evlist__munmap(evlist); +out_close_evlist: + perf_evlist__close(evlist); +out_delete_maps: + perf_evlist__delete_maps(evlist); out_delete_evlist: perf_evlist__delete(evlist); out: |