Allocate cleared memory for cpu state.
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 1 Dec 2008 14:29:13 +0000 (14:29 +0000)
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 1 Dec 2008 14:29:13 +0000 (14:29 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5848 c046a42c-6fe2-441c-8c8c-71466251a162

target-m68k/helper.c

index 405cb9af4e1366a389db966362f5ca8214717532..045687f639db935bd827b93a139e91fad6c237af 100644 (file)
@@ -160,7 +160,7 @@ CPUM68KState *cpu_m68k_init(const char *cpu_model)
     CPUM68KState *env;
     static int inited;
 
-    env = malloc(sizeof(CPUM68KState));
+    env = qemu_mallocz(sizeof(CPUM68KState));
     if (!env)
         return NULL;
     cpu_exec_init(env);