Messages in this thread Patch in this message | | | From | Masanari Iida <> | Subject | [PATCH/v2] perf test x86: Fit memory leak in sample_ustack() | Date | Mon, 21 Apr 2014 23:37:04 +0900 |
| |
buf is not freed, when program failed to get stack map
Signed-off-by: Masanari Iida <standby24x7@gmail.com> Acked-by: Jiri Olsa <jolsa@redhat.com> --- tools/perf/arch/x86/tests/dwarf-unwind.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/tools/perf/arch/x86/tests/dwarf-unwind.c b/tools/perf/arch/x86/tests/dwarf-unwind.c index b602ad9..b8c0102 100644 --- a/tools/perf/arch/x86/tests/dwarf-unwind.c +++ b/tools/perf/arch/x86/tests/dwarf-unwind.c @@ -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; } -- 1.9.2.468.g3f0c02a
| |