kconfig: Fix choice symbol expression leak
[carl9170fw.git] / config / menu.c
index 5b2415991c3ed355ea5ad011b475d79cc6797de1..41c79bef3d075fa1122643ceb3cdae9e8289e8d5 100644 (file)
@@ -408,6 +408,9 @@ void menu_finalize(struct menu *parent)
                        }
                }
 
+               if (sym && sym_is_choice(sym))
+                       expr_free(parentdep);
+
                /*
                 * Recursively process children in the same fashion before
                 * moving on