Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- hw/pci-bridge/xio3130_upstream.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/hw/pci-bridge/xio3130_upstream.c b/hw/pci-bridge/xio3130_upstream.c index 9485f5e..f719496 100644 --- a/hw/pci-bridge/xio3130_upstream.c +++ b/hw/pci-bridge/xio3130_upstream.c @@ -104,6 +104,12 @@ static void xio3130_upstream_exitfn(PCIDevice *d) pcie_cap_exit(d); msi_uninit(d); pci_bridge_exitfn(d); +} + +static void xio3130_upstream_instance_finalize(Object *obj) +{ + PCIDevice *d = PCI_DEVICE(obj); + pcie_aer_free(d); pci_bridge_free(d); } @@ -174,6 +180,7 @@ static const TypeInfo xio3130_upstream_info = { .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(PCIEPort), .class_init = xio3130_upstream_class_init, + .instance_finalize = xio3130_upstream_instance_finalize, }; static void xio3130_upstream_register_types(void) -- 1.8.1.4