Just like we did two commits ago, don't try to fetch capabilities for non-existing binary. Re-use the ones we have for running domain. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/qemu/qemu_domain.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 70fac56..2b24c01 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -2774,17 +2774,21 @@ qemuDomainDefAssignAddresses(virDomainDef *def, virCapsPtr caps, unsigned int parseFlags ATTRIBUTE_UNUSED, void *opaque, - void *parseOpaque ATTRIBUTE_UNUSED) + void *parseOpaque) { virQEMUDriverPtr driver = opaque; - virQEMUCapsPtr qemuCaps = NULL; + virQEMUCapsPtr qemuCaps = parseOpaque; int ret = -1; bool newDomain = parseFlags & VIR_DOMAIN_DEF_PARSE_ABI_UPDATE; - if (!(qemuCaps = virQEMUCapsCacheLookup(caps, - driver->qemuCapsCache, - def->emulator))) - goto cleanup; + if (qemuCaps) { + virObjectRef(qemuCaps); + } else { + if (!(qemuCaps = virQEMUCapsCacheLookup(caps, + driver->qemuCapsCache, + def->emulator))) + goto cleanup; + } if (qemuDomainAssignAddresses(def, qemuCaps, NULL, newDomain) < 0) goto cleanup; -- 2.8.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list