aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2011-08-09 14:20:23 +0200
committerChristopher Li <sparse@chrisli.org>2011-08-10 19:55:24 -0700
commit84e51f9005d81e21c24c453babbb9347f0fd0795 (patch)
tree2f54a1e0febac6110bd177e41483e841dd5b4bd8
parent9bc7588b099c4178a509696c4f423fd170180c28 (diff)
downloadsparse-84e51f9005d81e21c24c453babbb9347f0fd0795.tar.gz
fix a memory leak in compile-i386.c
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> Signed-off-by: Christopher Li <sparse@chrisli.org>
-rw-r--r--compile-i386.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/compile-i386.c b/compile-i386.c
index abe93131..da3ee497 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);