Skip to content

Commit

Permalink
perf tests: Fixup return path of open-syscall-tp-fields test case
Browse files Browse the repository at this point in the history
Add missing evlist cleanup functions.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1363326533-3310-5-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Namhyung Kim authored and Arnaldo Carvalho de Melo committed Mar 15, 2013
1 parent 8fa60e1 commit 9b5b7cd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tools/perf/tests/open-syscall-tp-fields.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -110,6 +110,10 @@ int test__syscall_open_tp_fields(void)
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:
Expand Down

0 comments on commit 9b5b7cd

Please sign in to comment.