diff options
| author | Wang Hai <wanghai38@huawei.com> | 2020-07-30 14:36:02 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-08-21 13:07:41 +0200 |
| commit | 07a4dc1435820ef9fcbb9767a0239336d24ca9bf (patch) | |
| tree | 65d23ef264bfc0ee958d141e66f9d3188bb56c27 | |
| parent | 64efb94072ae2e99da7886930c1321cf8d537f0f (diff) | |
s390/test_unwind: fix possible memleak in test_unwind()
[ Upstream commit 75d3e7f4769d276a056efa1cc7f08de571fc9b4b ]
test_unwind() misses to call kfree(bt) in an error path.
Add the missed function call to fix it.
Fixes: 0610154650f1 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
| -rw-r--r-- | arch/s390/lib/test_unwind.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/s390/lib/test_unwind.c b/arch/s390/lib/test_unwind.c index 32b7a30b2485..b0b12b46bc57 100644 --- a/arch/s390/lib/test_unwind.c +++ b/arch/s390/lib/test_unwind.c @@ -63,6 +63,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); |
