mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-23 11:52:20 +00:00
qemuProcessInit: Jump onto correct label in case of error
After eca76884ea in case of error in qemuDomainSetPrivatePaths() in pretended start we jump to stop. I've changed this during review from 'cleanup' which turned out to be correct. Well, sort of. We can't call qemuProcessStop() as it decrements driver->nactive and we did not increment it. However, it calls virDomainObjRemoveTransientDef() which is basically the only function we need to call. So call that function and goto cleanup; Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
1784c03ddb
commit
9f26de1285
@ -4757,8 +4757,10 @@ qemuProcessInit(virQEMUDriverPtr driver,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (flags & VIR_QEMU_PROCESS_START_PRETEND) {
|
if (flags & VIR_QEMU_PROCESS_START_PRETEND) {
|
||||||
if (qemuDomainSetPrivatePaths(driver, vm) < 0)
|
if (qemuDomainSetPrivatePaths(driver, vm) < 0) {
|
||||||
goto stop;
|
virDomainObjRemoveTransientDef(vm);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
vm->def->id = qemuDriverAllocateID(driver);
|
vm->def->id = qemuDriverAllocateID(driver);
|
||||||
qemuDomainSetFakeReboot(driver, vm, false);
|
qemuDomainSetFakeReboot(driver, vm, false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user