mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
perf tests x86: Fix memory leak in sample_ustack()
The buf is not freed, when kernel failed to get stack map and return. Signed-off-by: Masanari Iida <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Jiri Olsa <[email protected]>
This commit is contained in:
parent
fd741edc25
commit
763d7f5f27
1 changed files with 1 additions and 0 deletions
|
|
@ -26,6 +26,7 @@ static int sample_ustack(struct perf_sample *sample,
|
|||
map = map_groups__find(&thread->mg, MAP__FUNCTION, (u64) sp);
|
||||
if (!map) {
|
||||
pr_debug("failed to get stack map\n");
|
||||
free(buf);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue