mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-03 10:25:16 +00:00
Fix PCI address handling when controllers are deleted
* src/qemu/qemu_driver.c: in qemudDomainDetachPciControllerDevice() when a controller is not present in the system anymore, the PCI address must be deleted from libvirt's hashtable because it can be re-used for other purposes.
This commit is contained in:
parent
24cc058e5e
commit
55946f23a6
@ -6280,6 +6280,11 @@ static int qemudDomainDetachPciControllerDevice(struct qemud_driver *driver,
|
||||
VIR_FREE(vm->def->controllers);
|
||||
vm->def->ncontrollers = 0;
|
||||
}
|
||||
|
||||
if (qemuDomainPCIAddressReleaseAddr(priv->pciaddrs, &detach->info) < 0) {
|
||||
VIR_WARN0("Unable to release PCI address on controller");
|
||||
}
|
||||
|
||||
virDomainControllerDefFree(detach);
|
||||
|
||||
ret = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user