On Fri, Sep 23, 2016 at 15:25:02 +0200, Michal Privoznik wrote: > 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 <mpriv...@redhat.com> > --- > 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;
Do we really need to have a separate patch for a single change in several functions? ACK Jirka -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list