aboutsummaryrefslogtreecommitdiff
path: root/hw/pci.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-11-23 09:47:15 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2012-11-26 13:41:00 -0600
commit64b625f4b2fdb2c873e25c149648b2ce923faab7 (patch)
treec0ecebd3d237877cba1d232454ae5dd43d27b43c /hw/pci.c
parentfde9bf4470d4a3b6ee1da0dee2370ab028b6314a (diff)
qdev: simplify (de)allocation of buses
All conditional deallocation can now be done with object_delete. Remove the @qom_allocated and @glib_allocated fields; replace the latter with a direct assignment of the @free function pointer. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/pci.c')
-rw-r--r--hw/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/pci.c b/hw/pci.c
index 9841e398a6..97a0cd77c1 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -301,9 +301,9 @@ PCIBus *pci_bus_new(DeviceState *parent, const char *name,
PCIBus *bus;
bus = g_malloc0(sizeof(*bus));
- bus->qbus.glib_allocated = true;
pci_bus_new_inplace(bus, parent, name, address_space_mem,
address_space_io, devfn_min);
+ OBJECT(bus)->free = g_free;
return bus;
}