Message ID | a337f295defad7eb977da4d6317cf70f7f2fa4b4.1473782118.git.mjt@msgid.tls.msk.ru (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/target-sparc/cpu.c b/target-sparc/cpu.c index e4089f2..800a25a 100644 --- a/target-sparc/cpu.c +++ b/target-sparc/cpu.c @@ -117,8 +117,7 @@ static int cpu_sparc_register(SPARCCPU *cpu, const char *cpu_model) return -1; } - env->def = g_new0(sparc_def_t, 1); - memcpy(env->def, def, sizeof(*def)); + env->def = g_memdup(def, sizeof(*def)); featurestr = strtok(NULL, ","); sparc_cpu_parse_features(CPU(cpu), featurestr, &err);