From f26e1c7cb279051d83e0b671f48b30fe88c2c788 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Fri, 3 Jan 2014 16:54:12 -0300 Subject: perf evlist: Close fds on destructor Since it is safe to call perf_evlist__close() multiple times, autoclose it and remove the calls to the close from existing tools, reducing the tooling boilerplate. Cc: Adrian Hunter Cc: David Ahern Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Mike Galbraith Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-2kq9v7p1rude1tqxa0aue2tk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-record.c | 1 - 1 file changed, 1 deletion(-) (limited to 'tools/perf/builtin-record.c') diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 5149b41e63d1..b7f5e438276b 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -970,7 +970,6 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused) err = __cmd_record(&record, argc, argv); perf_evlist__munmap(rec->evlist); - perf_evlist__close(rec->evlist); out_symbol_exit: symbol__exit(); return err; -- cgit v1.2.3