linux-stable/scripts/kconfig
Ulf Magnusson 18004e6f26 kconfig: Fix expr_free() E_NOT leak
[ Upstream commit 5b1374b3b3 ]

Only the E_NOT operand and not the E_NOT node itself was freed, due to
accidentally returning too early in expr_free(). Outline of leak:

	switch (e->type) {
	...
	case E_NOT:
		expr_free(e->left.expr);
		return;
	...
	}
	*Never reached, 'e' leaked*
	free(e);

Fix by changing the 'return' to a 'break'.

Summary from Valgrind on 'menuconfig' (ARCH=x86) before the fix:

	LEAK SUMMARY:
	   definitely lost: 44,448 bytes in 1,852 blocks
	   ...

Summary after the fix:

	LEAK SUMMARY:
	   definitely lost: 1,608 bytes in 67 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>
2018-04-26 11:02:08 +02:00
..
lxdialog License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
.gitignore Remove gperf usage from toolchain 2017-08-19 11:02:53 -07:00
check.sh License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
conf.c kconfig: allow kconfig to handle longer path names 2015-12-10 11:06:10 +01:00
confdata.c kconfig: add unexpected data itself to warning 2016-05-10 17:20:19 +02:00
expr.c kconfig: Fix expr_free() E_NOT leak 2018-04-26 11:02:08 +02:00
expr.h Kconfig: Introduce the "imply" keyword 2016-11-16 09:26:33 +01:00
gconf.c gconfig: remove misleading parentheses around a condition 2017-03-22 02:56:33 +09:00
gconf.glade scripts/kconfig/gconf.glade Update broken web addresses. 2010-09-17 16:54:42 +02:00
images.c
kconf_id.c Remove gperf usage from toolchain 2017-08-19 11:02:53 -07:00
kxgettext.c kconfig: nuke LKC_DIRECT_LINK cruft 2011-06-06 15:32:20 -04:00
list.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
lkc.h Remove gperf usage from toolchain 2017-08-19 11:02:53 -07:00
lkc_proto.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mconf.c kconfig: Do not print status messages in make -s mode 2015-04-09 17:44:34 +02:00
menu.c kconfig: Fix automatic menu creation mem leak 2018-04-26 11:02:08 +02:00
merge_config.sh kconfig/merge_config.sh: Accept a single file 2015-10-14 16:19:37 +02:00
nconf.c kconfig: fix sparse warnings in nconfig 2017-06-23 06:00:52 +09:00
nconf.gui.c kconfig: fix sparse warnings in nconfig 2017-06-23 06:00:52 +09:00
nconf.h scripts/kconfig/nconf: dynamically alloc dialog_input_result 2011-09-09 14:40:08 +02:00
POTFILES.in
qconf.cc xconfig: fix missing suboption and help panels on first run 2016-12-11 21:40:54 +01:00
qconf.h Port xconfig to Qt5 - Source format. 2015-10-14 14:59:03 +02:00
streamline_config.pl scripts: Switch to more portable Perl shebang 2017-05-14 11:20:44 +09:00
symbol.c Kconfig: Introduce the "imply" keyword 2016-11-16 09:26:33 +01:00
util.c kconfig: Remove dead code 2015-02-25 15:00:16 +01:00
zconf.l kconfig: warn of unhandled characters in Kconfig commands 2015-08-19 17:05:39 +02:00
zconf.lex.c_shipped kconfig: Regenerate shipped zconf.{hash,lex}.c files 2015-08-19 17:05:39 +02:00
zconf.tab.c_shipped Remove gperf usage from toolchain 2017-08-19 11:02:53 -07:00
zconf.y kconfig: Don't leak main menus during parsing 2018-04-26 11:02:08 +02:00