mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-30 15:44:13 +08: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
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user