summaryrefslogtreecommitdiff
path: root/scripts/xen-hypercalls.sh
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2017-10-08 19:11:21 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-30 07:48:53 +0200
commit608b42a3488f2bb9a44d44fc5773322f6d04da21 (patch)
treee0fac79005778f8c5149cb0bf19618a7e88698bf /scripts/xen-hypercalls.sh
parent278480bd2416c7501385e151d1d36b4e79bd868e (diff)
kconfig: Don't leak main menus during parsing
[ Upstream commit 0724a7c32a54e3e50d28e19e30c59014f61d4e2c ] If a 'mainmenu' entry appeared in the Kconfig files, two things would leak: - The 'struct property' allocated for the default "Linux Kernel Configuration" prompt. - The string for the T_WORD/T_WORD_QUOTE prompt after the T_MAINMENU token, allocated on the heap in zconf.l. To fix it, introduce a new 'no_mainmenu_stmt' nonterminal that matches if there's no 'mainmenu' and adds the default prompt. That means the prompt only gets allocated once regardless of whether there's a 'mainmenu' statement or not, and managing it becomes simple. Summary from Valgrind on 'menuconfig' (ARCH=x86) before the fix: LEAK SUMMARY: definitely lost: 344,568 bytes in 14,352 blocks ... Summary after the fix: LEAK SUMMARY: definitely lost: 344,440 bytes in 14,350 blocks ... Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/xen-hypercalls.sh')
0 files changed, 0 insertions, 0 deletions