Signed-off-by: Paolo Bonzini <[email protected]>
---
hw/pci-bridge/xio3130_downstream.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/hw/pci-bridge/xio3130_downstream.c
b/hw/pci-bridge/xio3130_downstream.c
index 6ff336f..477cb12 100644
--- a/hw/pci-bridge/xio3130_downstream.c
+++ b/hw/pci-bridge/xio3130_downstream.c
@@ -122,6 +122,12 @@ static void xio3130_downstream_exitfn(PCIDevice *d)
pcie_cap_exit(d);
msi_uninit(d);
pci_bridge_exitfn(d);
+}
+
+static void xio3130_downstream_instance_finalize(Object *obj)
+{
+ PCIDevice *d = PCI_DEVICE(obj);
+
pcie_aer_free(d);
pci_bridge_free(d);
}
@@ -200,6 +206,7 @@ static const TypeInfo xio3130_downstream_info = {
.parent = TYPE_PCI_DEVICE,
.instance_size = sizeof(PCIESlot),
.class_init = xio3130_downstream_class_init,
+ .instance_finalize = xio3130_downstream_instance_finalize,
};
static void xio3130_downstream_register_types(void)
--
1.8.1.4