提交 a050815a 编写于 作者: P Peter Krempa 提交者: Cole Robinson

qemu: Move freeing of PCI address list to qemuProcessStop

Rather than freeing the list before starting a new VM clear it after
stopping the old instance when the data becomes invalid.

(cherry picked from commit 44f8e00b)
上级 b4b88049
......@@ -2221,7 +2221,6 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def,
if (obj && obj->privateData) {
priv = obj->privateData;
/* if this is the live domain object, we persist the PCI addresses */
virDomainPCIAddressSetFree(priv->pciaddrs);
priv->pciaddrs = addrs;
addrs = NULL;
}
......
......@@ -6438,6 +6438,8 @@ void qemuProcessStop(virQEMUDriverPtr driver,
priv->autoCpuset = NULL;
/* remove address data */
virDomainPCIAddressSetFree(priv->pciaddrs);
priv->pciaddrs = NULL;
virDomainUSBAddressSetFree(priv->usbaddrs);
priv->usbaddrs = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册