diff options
-rw-r--r-- | tools/perf/util/hist.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index 828cb9794c76..e1e94b44d588 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c @@ -1048,8 +1048,10 @@ int hist_entry_iter__add(struct hist_entry_iter *iter, struct addr_location *al, err = sample__resolve_callchain(iter->sample, &callchain_cursor, &iter->parent, iter->evsel, al, max_stack_depth); - if (err) + if (err) { + map__put(alm); return err; + } err = iter->ops->prepare_entry(iter, al); if (err) |