summaryrefslogtreecommitdiff
path: root/tools/perf/arch/x86/tests/dwarf-unwind.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/arch/x86/tests/dwarf-unwind.c')
-rw-r--r--tools/perf/arch/x86/tests/dwarf-unwind.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/arch/x86/tests/dwarf-unwind.c b/tools/perf/arch/x86/tests/dwarf-unwind.c
index b602ad93ce63..83bc2385e6d3 100644
--- a/tools/perf/arch/x86/tests/dwarf-unwind.c
+++ b/tools/perf/arch/x86/tests/dwarf-unwind.c
@@ -23,9 +23,10 @@ static int sample_ustack(struct perf_sample *sample,
sp = (unsigned long) regs[PERF_REG_X86_SP];
- map = map_groups__find(&thread->mg, MAP__FUNCTION, (u64) sp);
+ map = map_groups__find(&thread->mg, MAP__VARIABLE, (u64) sp);
if (!map) {
pr_debug("failed to get stack map\n");
+ free(buf);
return -1;
}