[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-8fa60e1fbaecd2e652abe41f68a934c1759663f3@git.kernel.org>
Date: Thu, 21 Mar 2013 04:44:07 -0700
From: tip-bot for Namhyung Kim <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: acme@...hat.com, linux-kernel@...r.kernel.org, paulus@...ba.org,
hpa@...or.com, mingo@...nel.org, a.p.zijlstra@...llo.nl,
namhyung.kim@....com, namhyung@...nel.org, jolsa@...hat.com,
dsahern@...il.com, tglx@...utronix.de
Subject: [tip:perf/core] perf record: Fixup return path of cmd_record()
Commit-ID: 8fa60e1fbaecd2e652abe41f68a934c1759663f3
Gitweb: http://git.kernel.org/tip/8fa60e1fbaecd2e652abe41f68a934c1759663f3
Author: Namhyung Kim <namhyung.kim@....com>
AuthorDate: Fri, 15 Mar 2013 14:48:51 +0900
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Fri, 15 Mar 2013 13:06:11 -0300
perf record: Fixup return path of cmd_record()
The error path of calling perf_target__parse_uid wrongly went to
out_free_fd. Also add missing evlist cleanup routines.
Signed-off-by: Namhyung Kim <namhyung@...nel.org>
Cc: David Ahern <dsahern@...il.com>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: http://lkml.kernel.org/r/1363326533-3310-4-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/builtin-record.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 80cc3ea..9f2344a 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -1028,7 +1028,7 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
ui__error("%s", errbuf);
err = -saved_errno;
- goto out_free_fd;
+ goto out_symbol_exit;
}
err = -ENOMEM;
@@ -1059,6 +1059,9 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
}
err = __cmd_record(&record, argc, argv);
+
+ perf_evlist__munmap(evsel_list);
+ perf_evlist__close(evsel_list);
out_free_fd:
perf_evlist__delete_maps(evsel_list);
out_symbol_exit:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists