{
MachineClass *mc = MACHINE_GET_CLASS(obj);
MachineState *ms = MACHINE(obj);
- SMPConfiguration *config;
+ g_autoptr(SMPConfiguration) config = NULL;
ERRP_GUARD();
if (!visit_type_SMPConfiguration(v, name, &config, errp)) {
smp_parse(ms, config, errp);
if (*errp) {
- goto out_free;
+ return;
}
/* sanity-check smp_cpus and max_cpus against mc */
ms->smp.max_cpus,
mc->name, mc->max_cpus);
}
-
-out_free:
- qapi_free_SMPConfiguration(config);
}
static void machine_class_init(ObjectClass *oc, void *data)