From patchwork Tue Sep 21 12:32:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Catalin Marinas X-Patchwork-Id: 196982 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8LCX8SE006080 for ; Tue, 21 Sep 2010 12:33:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753990Ab0IUMdH (ORCPT ); Tue, 21 Sep 2010 08:33:07 -0400 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:59686 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753922Ab0IUMdH (ORCPT ); Tue, 21 Sep 2010 08:33:07 -0400 Received: from cam-owa2.Emea.Arm.com (cam-owa2.emea.arm.com [10.1.105.18]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id o8LCUHF9000197; Tue, 21 Sep 2010 13:30:17 +0100 (BST) Received: from [10.1.77.43] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 21 Sep 2010 13:32:59 +0100 Subject: Re: Stale expression reference causing use-after-free From: Catalin Marinas To: Arnaud Lacombe Cc: Michal Marek , "linux-kbuild@vger.kernel.org" In-Reply-To: References: Organization: ARM Limited Date: Tue, 21 Sep 2010 13:32:59 +0100 Message-ID: <1285072379.15732.70.camel@e102109-lin.cambridge.arm.com> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 X-OriginalArrivalTime: 21 Sep 2010 12:32:59.0790 (UTC) FILETIME=[20531AE0:01CB5989] Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 21 Sep 2010 12:33:08 +0000 (UTC) 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;