Commit 6ad1d22b15c0a091edb1d8efc983c1d75f74ef45
1 parent
0c9c3a9e
Allocate cleared memory for cpu state.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5848 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
1 additions
and
1 deletions
target-m68k/helper.c
... | ... | @@ -160,7 +160,7 @@ CPUM68KState *cpu_m68k_init(const char *cpu_model) |
160 | 160 | CPUM68KState *env; |
161 | 161 | static int inited; |
162 | 162 | |
163 | - env = malloc(sizeof(CPUM68KState)); | |
163 | + env = qemu_mallocz(sizeof(CPUM68KState)); | |
164 | 164 | if (!env) |
165 | 165 | return NULL; |
166 | 166 | cpu_exec_init(env); | ... | ... |