mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue