aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/coccinelle
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-11-24 01:04:30 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-11-25 21:00:33 +0900
commit21915eca088dc271c970e8351290e83d938114ac (patch)
treef0310de5a5911d4373276c7e001a9a54cf13f6ac /scripts/coccinelle
parentscripts/kallsyms: remove unneeded #ifndef ARRAY_SIZE (diff)
downloadlinux-dev-21915eca088dc271c970e8351290e83d938114ac.tar.xz
linux-dev-21915eca088dc271c970e8351290e83d938114ac.zip
scripts/kallsyms: fix definitely-lost memory leak
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>
Diffstat (limited to 'scripts/coccinelle')
0 files changed, 0 insertions, 0 deletions