提交 e44d2400 编写于 作者: J John Ferlan 提交者: Peter Krempa

qemu: Check valid activeDev before calling pciDeviceSetUsedBy

上级 55599102
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册