Commit-ID:  da522c17035a8415232d850b539ea60063fc7ecc
Gitweb:     http://git.kernel.org/tip/da522c17035a8415232d850b539ea60063fc7ecc
Author:     Namhyung Kim <[email protected]>
AuthorDate: Fri, 15 Mar 2013 14:48:53 +0900
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Fri, 15 Mar 2013 13:06:12 -0300

perf tests: Fixup return path of perf record test case

Add missing perf_evlist__close() function.

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]>
---
 tools/perf/tests/perf-record.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/perf/tests/perf-record.c b/tools/perf/tests/perf-record.c
index ffab5a4..72d8881 100644
--- a/tools/perf/tests/perf-record.c
+++ b/tools/perf/tests/perf-record.c
@@ -143,7 +143,7 @@ int test__PERF_RECORD(void)
        err = perf_evlist__mmap(evlist, opts.mmap_pages, false);
        if (err < 0) {
                pr_debug("perf_evlist__mmap: %s\n", strerror(errno));
-               goto out_delete_maps;
+               goto out_close_evlist;
        }
 
        /*
@@ -306,6 +306,8 @@ found_exit:
        }
 out_err:
        perf_evlist__munmap(evlist);
+out_close_evlist:
+       perf_evlist__close(evlist);
 out_delete_maps:
        perf_evlist__delete_maps(evlist);
 out_delete_evlist:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to