Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 763d7f5f authored by Masanari Iida's avatar Masanari Iida Committed by Jiri Olsa
Browse files

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: default avatarMasanari Iida <standby24x7@gmail.com>
Link: http://lkml.kernel.org/r/1398091024-7901-1-git-send-email-standby24x7@gmail.com


Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
parent fd741edc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
	}