Rather than freeing the list before starting a new VM clear it after
stopping the old instance when the data becomes invalid.
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;
}
priv->autoCpuset = NULL;
/* remove address data */
+ virDomainPCIAddressSetFree(priv->pciaddrs);
+ priv->pciaddrs = NULL;
virDomainUSBAddressSetFree(priv->usbaddrs);
priv->usbaddrs = NULL;