diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index b6f0725068bda07d46d43f52c8097003d7375bb7..6016112e801ab3c5b99e82c6edc7fa8459e22475 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -994,6 +994,9 @@ static int trace__run(struct trace *trace, int argc, const char **argv) handler = evsel->handler.func; handler(trace, evsel, &sample); + + if (done) + goto out_unmap_evlist; } }