diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-03 13:51:39 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-03 13:51:39 -0500 |
commit | 70d544d0576775a2b3923a7e68cb49b0313d80c9 (patch) | |
tree | c848ffcc5b1146fc35d496472349d2e4795b0ff3 /tools/perf/perf.c | |
parent | 1e7972cc5c16e06f258b0278d8c9adfb5aa75c68 (diff) |
perf evsel: Delete the event selectors at exit
Freeing all the possibly allocated resources, reducing complexity
on each tool exit path.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/perf.c')
-rw-r--r-- | tools/perf/perf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/perf.c b/tools/perf/perf.c index 595d0f4a7103..5b1ecd66bb36 100644 --- a/tools/perf/perf.c +++ b/tools/perf/perf.c | |||
@@ -286,6 +286,8 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv) | |||
286 | status = p->fn(argc, argv, prefix); | 286 | status = p->fn(argc, argv, prefix); |
287 | exit_browser(status); | 287 | exit_browser(status); |
288 | 288 | ||
289 | perf_evsel_list__delete(); | ||
290 | |||
289 | if (status) | 291 | if (status) |
290 | return status & 0xff; | 292 | return status & 0xff; |
291 | 293 | ||