virDomainVcpuDefPtr vcpu;
qemuDomainVcpuPrivatePtr vcpupriv;
size_t maxvcpus = virDomainDefGetVcpusMax(vm->def);
- virBitmapPtr haltedmap = NULL;
+ g_autoptr(virBitmap) haltedmap = NULL;
size_t i;
- int ret = -1;
bool fast;
/* Not supported currently for TCG, see qemuDomainRefreshVcpuInfo */
haltedmap = qemuMonitorGetCpuHalted(qemuDomainGetMonitor(vm), maxvcpus,
fast);
if (qemuDomainObjExitMonitor(driver, vm) < 0 || !haltedmap)
- goto cleanup;
+ return -1;
for (i = 0; i < maxvcpus; i++) {
vcpu = virDomainDefGetVcpu(vm->def, i);
vcpupriv->qemu_id));
}
- ret = 0;
-
- cleanup:
- virBitmapFree(haltedmap);
- return ret;
+ return 0;
}
bool