Browse Source

target-arm: Fix use of free() in cpu_arm_close()

env is allocated in cpu_arm_init() with g_malloc0(), so free with g_free().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Andreas Färber 14 years ago
parent
commit
12b1de3a3f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      target-arm/helper.c

+ 1 - 1
target-arm/helper.c

@@ -475,7 +475,7 @@ static uint32_t cpu_arm_find_by_name(const char *name)
 
 void cpu_arm_close(CPUARMState *env)
 {
-    free(env);
+    g_free(env);
 }
 
 uint32_t cpsr_read(CPUARMState *env)