From patchwork Tue Aug 9 12:20:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 1049362 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p79CKiMp028092 for ; Tue, 9 Aug 2011 12:20:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753125Ab1HIMUo (ORCPT ); Tue, 9 Aug 2011 08:20:44 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:46602 "HELO mailout-de.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752970Ab1HIMUn (ORCPT ); Tue, 9 Aug 2011 08:20:43 -0400 Received: (qmail invoked by alias); 09 Aug 2011 12:20:41 -0000 Received: from dslb-084-060-232-218.pools.arcor-ip.net (EHLO debian.debian) [84.60.232.218] by mail.gmx.net (mp059) with SMTP; 09 Aug 2011 14:20:41 +0200 X-Authenticated: #41721828 X-Provags-ID: V01U2FsdGVkX19DRf06jHND7YJcyjokrvGN4qEiMi14I+cIs6+TRJ /uRE2I0geqYY21 From: =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= To: linux-sparse@vger.kernel.org Cc: Dan Carpenter , =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= Subject: [PATCH] fix a memory leak in compile-i386.c Date: Tue, 9 Aug 2011 14:20:23 +0200 Message-Id: <1312892423-5178-1-git-send-email-j.neuschaefer@gmx.net> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <20110809115554.GH7659@shale.localdomain> References: <20110809115554.GH7659@shale.localdomain> MIME-Version: 1.0 X-Y-GMX-Trusted: 0 Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 09 Aug 2011 12:20:44 +0000 (UTC) Don't allocate val twice in emit_divide. Signed-off-by: Jonathan Neuschäfer Acked-by: Jeff Garzik --- compile-i386.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/compile-i386.c b/compile-i386.c index abe9313..da3ee49 100644 --- a/compile-i386.c +++ b/compile-i386.c @@ -1302,7 +1302,6 @@ static struct storage *emit_divide(struct expression *expr, struct storage *left eax_edx = get_hardreg(hardreg_storage_table + EAX_EDX, 1); /* init EDX to 0 */ - val = new_storage(STOR_VALUE); val->flags = STOR_WANTS_FREE; emit_move(val, REG_EDX, NULL, NULL);