mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05: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:
committed by
Daniel Veillard
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;
|
||||
|
||||
Reference in New Issue
Block a user