diff options
author | QiuXi <qiuxi1@huawei.com> | 2021-09-07 20:00:32 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-09-26 14:08:56 +0200 |
commit | 5d0e6a5e44416cdfd8b391fa46c69f7d08f9dd0d (patch) | |
tree | 78274c58f0c3e7f3871958fbe2f06f65e177d755 /tools/lib/string.c | |
parent | 6b24588708fe7cb680d433a0492abb651bb1d5b0 (diff) |
coredump: fix memleak in dump_vma_snapshot()
commit 6fcac87e1f9e5b27805a2a404f4849194bb51de8 upstream.
dump_vma_snapshot() allocs memory for *vma_meta, when dump_vma_snapshot()
returns -EFAULT, the memory will be leaked, so we free it correctly.
Link: https://lkml.kernel.org/r/20210810020441.62806-1-qiuxi1@huawei.com
Fixes: a07279c9a8cd7 ("binfmt_elf, binfmt_elf_fdpic: use a VMA list snapshot")
Signed-off-by: QiuXi <qiuxi1@huawei.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Jann Horn <jannh@google.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/lib/string.c')
0 files changed, 0 insertions, 0 deletions