diff mbox

fix a memory leak in compile-i386.c

Message ID 1312892423-5178-1-git-send-email-j.neuschaefer@gmx.net (mailing list archive)
State Mainlined, archived
Headers show

Commit Message

J. Neuschäfer Aug. 9, 2011, 12:20 p.m. UTC
Don't allocate val twice in emit_divide.

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
---
 compile-i386.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

Comments

Jeff Garzik Aug. 10, 2011, 5:41 a.m. UTC | #1
On 08/09/2011 08:20 AM, Jonathan Neuschäfer wrote:
> Don't allocate val twice in emit_divide.
>
> Signed-off-by: Jonathan Neuschäfer<j.neuschaefer@gmx.net>

Acked-by: Jeff Garzik <jgarzik@redhat.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Christopher Li Aug. 11, 2011, 10:05 a.m. UTC | #2
On Tue, Aug 9, 2011 at 10:41 PM, Jeff Garzik <jeff@garzik.org> wrote:
>
> Acked-by: Jeff Garzik <jgarzik@redhat.com>
>

Applied.

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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);