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:
Wolfgang Mauerer 2010-03-02 09:28:26 +01:00 committed by Daniel Veillard
parent 24cc058e5e
commit 55946f23a6

View File

@ -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;