Commit 75d3e7f4 authored by Wang Hai's avatar Wang Hai Committed by Heiko Carstens
Browse files

s390/test_unwind: fix possible memleak in test_unwind()



test_unwind() misses to call kfree(bt) in an error path.
Add the missed function call to fix it.

Fixes: 06101546 ("s390/test_unwind: print verbose unwinding results")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarWang Hai <wanghai38@huawei.com>
Acked-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent ba925fa3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ static noinline int test_unwind(struct task_struct *task, struct pt_regs *regs,
			break;
		if (state.reliable && !addr) {
			pr_err("unwind state reliable but addr is 0\n");
			kfree(bt);
			return -EINVAL;
		}
		sprint_symbol(sym, addr);