Skip to content

Commit 75d3e7f

Browse files
Wang Haihcahca
authored andcommitted
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: 0610154 ("s390/test_unwind: print verbose unwinding results") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Wang Hai <[email protected]> Acked-by: Ilya Leoshkevich <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent ba925fa commit 75d3e7f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/s390/lib/test_unwind.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ static noinline int test_unwind(struct task_struct *task, struct pt_regs *regs,
6464
break;
6565
if (state.reliable && !addr) {
6666
pr_err("unwind state reliable but addr is 0\n");
67+
kfree(bt);
6768
return -EINVAL;
6869
}
6970
sprint_symbol(sym, addr);

0 commit comments

Comments
 (0)