diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-11-23 19:04:30 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-04 15:41:02 +0300 |
commit | 9abb8f608800f015bb2f05dab238d8db17159628 (patch) | |
tree | ced265dd0ee5ce4d67651fdd6c412528b2bcc5b7 /.gitignore | |
parent | dac861db5b5d252efbf27476db6f8ffe309f779c (diff) | |
download | linux-9abb8f608800f015bb2f05dab238d8db17159628.tar.xz |
scripts/kallsyms: fix definitely-lost memory leak
[ Upstream commit 21915eca088dc271c970e8351290e83d938114ac ]
build_initial_tok_table() overwrites unused sym_entry to shrink the
table size. Before the entry is overwritten, table[i].sym must be freed
since it is malloc'ed data.
This fixes the 'definitely lost' report from valgrind. I ran valgrind
against x86_64_defconfig of v5.4-rc8 kernel, and here is the summary:
[Before the fix]
LEAK SUMMARY:
definitely lost: 53,184 bytes in 2,874 blocks
[After the fix]
LEAK SUMMARY:
definitely lost: 0 bytes in 0 blocks
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions