Skip to content
This repository was archived by the owner on Feb 9, 2023. It is now read-only.

Commit bf0bbdc

Browse files
committed
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 5a1aa8a ("kconfig: add named choice group"). Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Ulf Magnusson <[email protected]>
1 parent 1b1e4ee commit bf0bbdc

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

scripts/kconfig/zconf.y

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ choice: T_CHOICE word_opt T_EOL
276276
sym->flags |= SYMBOL_AUTO;
277277
menu_add_entry(sym);
278278
menu_add_expr(P_CHOICE, NULL, NULL);
279+
free($2);
279280
printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno());
280281
};
281282

0 commit comments

Comments
 (0)