diff lwasm/insn_rel.c @ 89:651b85a98c1b

Fixed memory leaks revealed by valgrind
author lost@l-w.ca
date Wed, 22 Jun 2011 18:57:59 -0600
parents 7317fbe024af
children 95181f1ad183
line wrap: on
line diff
--- a/lwasm/insn_rel.c	Wed Jun 22 18:57:42 2011 -0600
+++ b/lwasm/insn_rel.c	Wed Jun 22 18:57:59 2011 -0600
@@ -52,6 +52,7 @@
 	lw_expr_destroy(e1);
 	e1 = lw_expr_build(lw_expr_type_oper, lw_expr_oper_minus, t, e2);
 	lw_expr_destroy(e2);
+	lw_expr_destroy(t);
 	lwasm_save_expr(l, 0, e1);
 }
 
@@ -101,6 +102,7 @@
 	lw_expr_destroy(e1);
 	e1 = lw_expr_build(lw_expr_type_oper, lw_expr_oper_minus, t, e2);
 	lw_expr_destroy(e2);
+	lw_expr_destroy(t);
 	lwasm_save_expr(l, 0, e1);
 }