History

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").

Masahiro Yamada committed 8 years ago

Commit bf0bbdc1 parent 1b1e4ee1 file · +1 −0Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/kconfig/zconf.y+1−0
@@ -276,6 +276,7 @@ choice: T_CHOICE word_opt T_EOL · 275 unmodified lines
276 sym->flags |= SYMBOL_AUTO;276 sym->flags |= SYMBOL_AUTO;
277 menu_add_entry(sym);277 menu_add_entry(sym);
278 menu_add_expr(P_CHOICE, NULL, NULL);278 menu_add_expr(P_CHOICE, NULL, NULL);
279 free($2);
279 printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno());280 printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno());
280};281};
281 282