diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2013-03-15 01:48:51 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-03-15 12:06:11 -0400 |
commit | 8fa60e1fbaecd2e652abe41f68a934c1759663f3 (patch) | |
tree | 722b7b6a35a9d18772f2662788021c2184da36c5 /tools/perf/builtin-record.c | |
parent | 3beb0861438f63bc2025f8afba213dc3d0458bc5 (diff) |
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@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1363326533-3310-4-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r-- | tools/perf/builtin-record.c | 5 |
1 files changed, 4 insertions, 1 deletions
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) | |||
1028 | ui__error("%s", errbuf); | 1028 | ui__error("%s", errbuf); |
1029 | 1029 | ||
1030 | err = -saved_errno; | 1030 | err = -saved_errno; |
1031 | goto out_free_fd; | 1031 | goto out_symbol_exit; |
1032 | } | 1032 | } |
1033 | 1033 | ||
1034 | err = -ENOMEM; | 1034 | err = -ENOMEM; |
@@ -1059,6 +1059,9 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused) | |||
1059 | } | 1059 | } |
1060 | 1060 | ||
1061 | err = __cmd_record(&record, argc, argv); | 1061 | err = __cmd_record(&record, argc, argv); |
1062 | |||
1063 | perf_evlist__munmap(evsel_list); | ||
1064 | perf_evlist__close(evsel_list); | ||
1062 | out_free_fd: | 1065 | out_free_fd: |
1063 | perf_evlist__delete_maps(evsel_list); | 1066 | perf_evlist__delete_maps(evsel_list); |
1064 | out_symbol_exit: | 1067 | out_symbol_exit: |