Google
  Web www.spinics.net

[PATCH smatch] fix a memory leak in compile-i386.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Don't allocate val twice in emit_divide.

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@xxxxxxx>
---
 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);
 
-- 
1.7.5.4

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


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Video Projectors]     [PDAs]     [Free Online Dating]     [Hacking TiVo]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]     [Big List of Linux Books]

Add to Google Powered by Linux