perf tests: Fixup return path of open-syscall-tp-fields test case
authorNamhyung Kim <namhyung.kim@lge.com>
Fri, 15 Mar 2013 05:48:52 +0000 (14:48 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 15 Mar 2013 16:06:12 +0000 (13:06 -0300)
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>
tools/perf/tests/open-syscall-tp-fields.c

index 02cb74174e237cb57a4501bcd4a11f5e361b63e9..fc5b9fca8b47421e13b4fe1c38e07f267be5ade1 100644 (file)
@@ -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: