Retrieval of the driver capabilities as well as emulator capabilities
does not require the complete qemuProcessStop to be executed on
failure.
---
src/qemu/qemu_process.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 7b09ba7..0f617da 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -4431,7 +4431,14 @@ qemuProcessInit(virQEMUDriverPtr driver,
}
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
- goto stop;
+ goto cleanup;
+
+ VIR_DEBUG("Determining emulator version");
+ virObjectUnref(priv->qemuCaps);
+ if (!(priv->qemuCaps = virQEMUCapsCacheLookupCopy(driver->qemuCapsCache,
+ vm->def->emulator,
+ vm->def->os.machine)))
+ goto cleanup;
/* Some things, paths, ... are generated here and we want them to persist.
* Fill them in prior to setting the domain def as transient. */
@@ -4461,13 +4468,6 @@ qemuProcessInit(virQEMUDriverPtr driver,
VIR_HOOK_SUBOP_BEGIN) < 0)
goto stop;
- VIR_DEBUG("Determining emulator version");
- virObjectUnref(priv->qemuCaps);
- if (!(priv->qemuCaps = virQEMUCapsCacheLookupCopy(driver->qemuCapsCache,
- vm->def->emulator,
- vm->def->os.machine)))
- goto stop;
-
ret = 0;
cleanup:
--
2.6.2