diff options
author | Ingo Molnar <mingo@kernel.org> | 2020-03-19 15:01:45 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2020-03-19 15:01:45 +0100 |
commit | 409e1a31404082ecb85b54bba920a3dd8077c672 (patch) | |
tree | 50daa709a2e9c461316122eb7b7850de9eb30f03 /tools/perf/pmu-events | |
parent | fdca7c1496cf05657654b6576143e909fc160a61 (diff) | |
parent | db5d85ce82487331b06ec0e076b85b5a3968bf53 (diff) |
Merge branch 'perf/urgent' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/pmu-events')
-rw-r--r-- | tools/perf/pmu-events/jevents.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tools/perf/pmu-events/jevents.c b/tools/perf/pmu-events/jevents.c index 079c77b6a2fd..27b4da80f751 100644 --- a/tools/perf/pmu-events/jevents.c +++ b/tools/perf/pmu-events/jevents.c @@ -1082,10 +1082,9 @@ static int process_one_file(const char *fpath, const struct stat *sb, */ int main(int argc, char *argv[]) { - int rc; + int rc, ret = 0; int maxfds; char ldirname[PATH_MAX]; - const char *arch; const char *output_file; const char *start_dirname; @@ -1156,7 +1155,8 @@ int main(int argc, char *argv[]) /* Make build fail */ fclose(eventsfp); free_arch_std_events(); - return 1; + ret = 1; + goto out_free_mapfile; } else if (rc) { goto empty_map; } @@ -1174,14 +1174,17 @@ int main(int argc, char *argv[]) /* Make build fail */ fclose(eventsfp); free_arch_std_events(); - return 1; + ret = 1; } - return 0; + + goto out_free_mapfile; empty_map: fclose(eventsfp); create_empty_mapping(output_file); free_arch_std_events(); - return 0; +out_free_mapfile: + free(mapfile); + return ret; } |