[Title] remove memory leak
authorjinhyung.jo <jinhyung.jo@samsung.com>
Wed, 24 Aug 2011 05:08:42 +0000 (14:08 +0900)
committerjinhyung.jo <jinhyung.jo@samsung.com>
Wed, 24 Aug 2011 05:08:42 +0000 (14:08 +0900)
[Type] bug fix
[Module] Emulator/Qemu
[Priority]
[CQ#]
[Redmine#] 1955
[Problem] unexpected termination of emulator
[Cause]
[Solution] insert free() codes
[TestCase]

tcg/optimize.c

index 0da35e5..0771008 100644 (file)
@@ -469,6 +469,12 @@ static TCGArg *tcg_constant_folding(TCGContext *s, uint16_t *tcg_opc_ptr,
                 break;
         }
     }
+
+       if (vals)
+               free(vals);
+       if (state)
+               free(state);
+
     return gen_args;
 }