diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-08 21:18:09 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-08 21:18:09 -0700 |
| commit | b37668d0808a1bf15d05e678f431fb5fb4659c90 (patch) | |
| tree | c53c3f1c7043e87954f4b253332a3f577f99d1ce /scripts/kconfig/menu.c | |
| parent | 451372066dab1d98ba571b176bd1ce71922702f2 (diff) | |
| parent | 317ddd256b9c24b0d78fa8018f80f1e495481a10 (diff) | |
Merge 3.10-rc5 into staging-next
Diffstat (limited to 'scripts/kconfig/menu.c')
| -rw-r--r-- | scripts/kconfig/menu.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index b5c7d90df9df..fd3f0180e08f 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -146,11 +146,24 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e struct menu *menu = current_entry; while ((menu = menu->parent) != NULL) { + struct expr *dup_expr; + if (!menu->visibility) continue; + /* + * Do not add a reference to the + * menu's visibility expression but + * use a copy of it. Otherwise the + * expression reduction functions + * will modify expressions that have + * multiple references which can + * cause unwanted side effects. + */ + dup_expr = expr_copy(menu->visibility); + prop->visible.expr = expr_alloc_and(prop->visible.expr, - menu->visibility); + dup_expr); } } |
