]> git.proxmox.com Git - mirror_qemu.git/blobdiff - hw/ppc/spapr.c
spapr: fix memory leak in spapr_core_pre_plug()
[mirror_qemu.git] / hw / ppc / spapr.c
index 58c15efbabd8de8c44e61b3223d7fe179cae25da..bda3854e2be396e57d84c52e05a5acb2279d653b 100644 (file)
@@ -2805,7 +2805,7 @@ static void spapr_core_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
     if (cc->nr_threads != smp_threads) {
         error_setg(errp, "invalid nr-threads %d, must be %d",
                    cc->nr_threads, smp_threads);
-        return;
+        goto out;
     }
 
     core_slot = spapr_find_cpu_slot(MACHINE(hotplug_dev), cc->core_id, &index);