diff options
Diffstat (limited to 'tools/perf/tests/hists_output.c')
-rw-r--r-- | tools/perf/tests/hists_output.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/tests/hists_output.c b/tools/perf/tests/hists_output.c index d8a23db80094..fd7ec4f9aeb4 100644 --- a/tools/perf/tests/hists_output.c +++ b/tools/perf/tests/hists_output.c @@ -71,8 +71,10 @@ static int add_hist_entries(struct hists *hists, struct machine *machine) goto out; if (hist_entry_iter__add(&iter, &al, evsel, &sample, - PERF_MAX_STACK_DEPTH, NULL) < 0) + PERF_MAX_STACK_DEPTH, NULL) < 0) { + addr_location__put(&al); goto out; + } fake_samples[i].thread = al.thread; fake_samples[i].map = al.map; |