Message ID | 7c9d7a6aad364546da8b23c516fb2cbb9ec328f4.1452282495.git.crobinso@redhat.com |
---|---|
State | Accepted |
Commit | 3d92a000ff51225b3afb4dbb83e58e4446f9b035 |
Headers | show |
On 01/08/2016 08:03 PM, Laine Stump wrote: > On 01/08/2016 02:48 PM, Cole Robinson wrote: >> We weren't checking for failure of qemuCaps lookup >> --- >> src/qemu/qemu_domain.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c >> index 00c780d..97534c0 100644 >> --- a/src/qemu/qemu_domain.c >> +++ b/src/qemu/qemu_domain.c >> @@ -1247,7 +1247,9 @@ qemuDomainDefPostParse(virDomainDefPtr def, >> !(def->emulator = virDomainDefGetDefaultEmulator(def, caps))) >> return ret; >> - qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, def->emulator); >> + if (!(qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, >> + def->emulator))) >> + goto cleanup; >> if (qemuDomainDefAddDefaultDevices(def, qemuCaps) < 0) >> goto cleanup; > > ACK. Thanks, pushed now - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 00c780d..97534c0 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1247,7 +1247,9 @@ qemuDomainDefPostParse(virDomainDefPtr def, !(def->emulator = virDomainDefGetDefaultEmulator(def, caps))) return ret; - qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, def->emulator); + if (!(qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, + def->emulator))) + goto cleanup; if (qemuDomainDefAddDefaultDevices(def, qemuCaps) < 0) goto cleanup;