Skip to contentSkip to conversation

[5848] Allocate cleared memory for cpu state.

Qemu-devel Paul Brook 1 participant 1 message Dec 1, 2008

lore
Share & tools
lore

Paul Brook

author
#0 lore raw

Revision: 5848

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5848
Author:   pbrook
Date:     2008-12-01 14:29:13 +0000 (Mon, 01 Dec 2008)

Log Message:
-----------
Allocate cleared memory for cpu state.

Modified Paths:
--------------
trunk/target-m68k/helper.c

Modified: trunk/target-m68k/helper.c
===================================================================

target-m68k/helper.c +1 -1
@@ -160,7 +160,7 @@
     CPUM68KState *env;
     static int inited;
 
-    env = malloc(sizeof(CPUM68KState));
+    env = qemu_mallocz(sizeof(CPUM68KState));
     if (!env)
         return NULL;
     cpu_exec_init(env);