Masahiro Yamada 21915eca08 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>
2019-11-25 21:00:33 +09:00
..
2019-07-11 18:35:30 -07:00
2017-03-28 16:16:52 +02:00
2019-08-12 15:00:37 -06:00
2019-09-20 08:36:47 -07:00
2017-11-14 18:25:40 -08:00
2019-05-06 11:12:09 -07:00