Powered by Linux
[PATCH smatch] fix a memory leak in compile-i386.c — Semantic Matching Tool

[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


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux