From: Ulf Magnusson Date: Sun, 8 Oct 2017 17:11:20 +0000 (+0200) Subject: kconfig: Don't leak 'option' arguments during parsing X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;ds=sidebyside;h=abe137d30a33eea202364fc452787bbe1b9abe38;hp=abe137d30a33eea202364fc452787bbe1b9abe38;p=carl9170fw.git kconfig: Don't leak 'option' arguments during parsing The following strings would leak before this change: - option env="LEAKED" - option defconfig_list="LEAKED" These come in the form of T_WORD tokens and are always allocated on the heap in zconf.l. Free them. Summary from Valgrind on 'menuconfig' (ARCH=x86) before the fix: LEAK SUMMARY: definitely lost: 344,616 bytes in 14,355 blocks ... Summary after the fix: LEAK SUMMARY: definitely lost: 344,568 bytes in 14,352 blocks ... Signed-off-by: Ulf Magnusson Signed-off-by: Masahiro Yamada Signed-off-by: Christian Lamparter ---