mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
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);
|
||||
activeDev = pciDeviceListFind(driver->activePciHostdevs, dev);
|
||||
|
||||
pciDeviceSetUsedBy(activeDev, name);
|
||||
if (activeDev)
|
||||
pciDeviceSetUsedBy(activeDev, name);
|
||||
}
|
||||
|
||||
/* Loop 8: Now set the original states for hostdev def */
|
||||
|
Loading…
Reference in New Issue
Block a user