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,6 +511,7 @@ int qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver,
|
|||
dev = pciDeviceListGet(pcidevs, i);
|
||||
activeDev = pciDeviceListFind(driver->activePciHostdevs, dev);
|
||||
|
||||
if (activeDev)
|
||||
pciDeviceSetUsedBy(activeDev, name);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue