diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-01-03 17:30:04 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-01-13 10:06:22 -0300 |
commit | 2d4352c077b98215771cc081626c7a69289c4fac (patch) | |
tree | 044a0ea5261b203c3685662a63f27a8ffae1a687 /tools/perf | |
parent | 983874d173568f584a5988888645725496c09f24 (diff) | |
download | blackbird-op-linux-2d4352c077b98215771cc081626c7a69289c4fac.tar.gz blackbird-op-linux-2d4352c077b98215771cc081626c7a69289c4fac.zip |
perf tests: Fixup leak on error path in parse events test
We need to call the evlist destructor when failing to parse events.
Cc: Adrian Hunter <adrian.hunter@intel.com>
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@kernel.org>
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-ilslu69s7v7bpvdgqtrlp8f5@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/tests/parse-events.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c index e4ce8aed29d3..41dee5e67f63 100644 --- a/tools/perf/tests/parse-events.c +++ b/tools/perf/tests/parse-events.c @@ -1385,10 +1385,10 @@ static int test_event(struct evlist_test *e) if (ret) { pr_debug("failed to parse event '%s', err %d\n", e->name, ret); - return ret; + } else { + ret = e->check(evlist); } - - ret = e->check(evlist); + perf_evlist__delete(evlist); return ret; |