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>
This commit is contained in:
parent
983874d173
commit
2d4352c077
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue