From: Masahiro Yamada Date: Tue, 20 Feb 2018 11:40:29 +0000 (+0900) Subject: kconfig: Don't leak choice names during parsing X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=120e44ad1fcc23e18af4084d9f02d135854728fd;p=carl9170fw.git kconfig: Don't leak choice names during parsing The named choice is not used in the kernel tree, but if it were used, it would not be freed. The intention of the named choice can be seen in the log of commit 5a1aa8a1aff6 ("kconfig: add named choice group"). Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson Signed-off-by: Christian Lamparter --- diff --git a/config/zconf.y b/config/zconf.y index 250d58e..c292f27 100644 --- a/config/zconf.y +++ b/config/zconf.y @@ -276,6 +276,7 @@ choice: T_CHOICE word_opt T_EOL sym->flags |= SYMBOL_AUTO; menu_add_entry(sym); menu_add_expr(P_CHOICE, NULL, NULL); + free($2); printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno()); };