diff mbox

Stale expression reference causing use-after-free

Message ID 1285072379.15732.70.camel@e102109-lin.cambridge.arm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Catalin Marinas Sept. 21, 2010, 12:32 p.m. UTC
None
diff mbox

Patch

diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 4fb5902..7298806 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -292,7 +292,7 @@  void menu_finalize(struct menu *parent)
 			menu_finalize(menu);
 	} else if (sym) {
 		/* ignore inherited dependencies for dir_dep */
-		sym->dir_dep.expr = expr_transform(expr_copy(parent->dir_dep));
+		sym->dir_dep.expr = expr_transform(parent->dir_dep);
 		sym->dir_dep.expr = expr_eliminate_dups(sym->dir_dep.expr);
 
 		basedep = parent->prompt ? parent->prompt->visible.expr : NULL;