projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'perf-core-for-mingo-20160607' of git://git.kernel.org/pub/scm/linux/kernel...
[cascardo/linux.git]
/
tools
/
perf
/
util
/
machine.c
diff --git
a/tools/perf/util/machine.c
b/tools/perf/util/machine.c
index
b177218
..
a0c186a
100644
(file)
--- a/
tools/perf/util/machine.c
+++ b/
tools/perf/util/machine.c
@@
-1353,11
+1353,16
@@
int machine__process_mmap2_event(struct machine *machine,
if (map == NULL)
goto out_problem_map;
if (map == NULL)
goto out_problem_map;
- thread__insert_map(thread, map);
+ ret = thread__insert_map(thread, map);
+ if (ret)
+ goto out_problem_insert;
+
thread__put(thread);
map__put(map);
return 0;
thread__put(thread);
map__put(map);
return 0;
+out_problem_insert:
+ map__put(map);
out_problem_map:
thread__put(thread);
out_problem:
out_problem_map:
thread__put(thread);
out_problem:
@@
-1403,11
+1408,16
@@
int machine__process_mmap_event(struct machine *machine, union perf_event *event
if (map == NULL)
goto out_problem_map;
if (map == NULL)
goto out_problem_map;
- thread__insert_map(thread, map);
+ ret = thread__insert_map(thread, map);
+ if (ret)
+ goto out_problem_insert;
+
thread__put(thread);
map__put(map);
return 0;
thread__put(thread);
map__put(map);
return 0;
+out_problem_insert:
+ map__put(map);
out_problem_map:
thread__put(thread);
out_problem:
out_problem_map:
thread__put(thread);
out_problem: