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: 0610154650
("s390/test_unwind: print verbose unwinding results")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
This commit is contained in:
parent
ba925fa350
commit
75d3e7f476
arch/s390/lib
|
@ -64,6 +64,7 @@ static noinline int test_unwind(struct task_struct *task, struct pt_regs *regs,
|
||||||
break;
|
break;
|
||||||
if (state.reliable && !addr) {
|
if (state.reliable && !addr) {
|
||||||
pr_err("unwind state reliable but addr is 0\n");
|
pr_err("unwind state reliable but addr is 0\n");
|
||||||
|
kfree(bt);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
sprint_symbol(sym, addr);
|
sprint_symbol(sym, addr);
|
||||||
|
|
Loading…
Reference in New Issue