diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-03 19:51:39 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-03 19:51:39 +0100 |
commit | 70d544d0576775a2b3923a7e68cb49b0313d80c9 (patch) | |
tree | c848ffcc5b1146fc35d496472349d2e4795b0ff3 /tools/perf/builtin-top.c | |
parent | perf util: Move do_read from session to util (diff) | |
download | linux-70d544d0576775a2b3923a7e68cb49b0313d80c9.tar.xz linux-70d544d0576775a2b3923a7e68cb49b0313d80c9.zip |
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/builtin-top.c')
-rw-r--r-- | tools/perf/builtin-top.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 13a836efa1e1..27b9c14a0a07 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -1495,10 +1495,8 @@ int cmd_top(int argc, const char **argv, const char *prefix __used) status = __cmd_top(); out_free_fd: - list_for_each_entry(pos, &evsel_list, node) { - perf_evsel__free_fd(pos); + list_for_each_entry(pos, &evsel_list, node) perf_evsel__free_mmap(pos); - } return status; } |