mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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.
This commit is contained in:
parent
8c1fee5f12
commit
44f8e00b6b
@ -2221,7 +2221,6 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def,
|
|||||||
if (obj && obj->privateData) {
|
if (obj && obj->privateData) {
|
||||||
priv = obj->privateData;
|
priv = obj->privateData;
|
||||||
/* if this is the live domain object, we persist the PCI addresses */
|
/* if this is the live domain object, we persist the PCI addresses */
|
||||||
virDomainPCIAddressSetFree(priv->pciaddrs);
|
|
||||||
priv->pciaddrs = addrs;
|
priv->pciaddrs = addrs;
|
||||||
addrs = NULL;
|
addrs = NULL;
|
||||||
}
|
}
|
||||||
|
@ -6444,6 +6444,8 @@ void qemuProcessStop(virQEMUDriverPtr driver,
|
|||||||
priv->autoCpuset = NULL;
|
priv->autoCpuset = NULL;
|
||||||
|
|
||||||
/* remove address data */
|
/* remove address data */
|
||||||
|
virDomainPCIAddressSetFree(priv->pciaddrs);
|
||||||
|
priv->pciaddrs = NULL;
|
||||||
virDomainUSBAddressSetFree(priv->usbaddrs);
|
virDomainUSBAddressSetFree(priv->usbaddrs);
|
||||||
priv->usbaddrs = NULL;
|
priv->usbaddrs = NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user