mirror of https://gitee.com/openkylin/libvirt.git
qemu: Check valid activeDev before calling pciDeviceSetUsedBy
This commit is contained in:
parent
55599102b4
commit
e44d240092
|
@ -511,7 +511,8 @@ int qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver,
|
||||||
dev = pciDeviceListGet(pcidevs, i);
|
dev = pciDeviceListGet(pcidevs, i);
|
||||||
activeDev = pciDeviceListFind(driver->activePciHostdevs, dev);
|
activeDev = pciDeviceListFind(driver->activePciHostdevs, dev);
|
||||||
|
|
||||||
pciDeviceSetUsedBy(activeDev, name);
|
if (activeDev)
|
||||||
|
pciDeviceSetUsedBy(activeDev, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Loop 8: Now set the original states for hostdev def */
|
/* Loop 8: Now set the original states for hostdev def */
|
||||||
|
|
Loading…
Reference in New Issue