diff options
Diffstat (limited to 'target-arm')
-rw-r--r-- | target-arm/translate.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/target-arm/translate.c b/target-arm/translate.c index afb9b57c89..601db555aa 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -2199,13 +2199,10 @@ CPUARMState *cpu_arm_init(void) { CPUARMState *env; - cpu_exec_init(); - - env = malloc(sizeof(CPUARMState)); + env = qemu_mallocz(sizeof(CPUARMState)); if (!env) return NULL; - memset(env, 0, sizeof(CPUARMState)); - cpu_single_env = env; + cpu_exec_init(env); return env; } |