Messages in this thread Patch in this message | | | From | Namhyung Kim <> | Subject | [PATCH 4/6] perf record: Fixup return path of cmd_record() | Date | Fri, 15 Mar 2013 14:48:51 +0900 |
| |
From: Namhyung Kim <namhyung.kim@lge.com>
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@kernel.org> --- 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 80cc3ea07788..9f2344a2c506 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: -- 1.7.11.7
| |