diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-11-23 09:47:15 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-11-26 13:41:00 -0600 |
commit | 64b625f4b2fdb2c873e25c149648b2ce923faab7 (patch) | |
tree | c0ecebd3d237877cba1d232454ae5dd43d27b43c /hw/pci.c | |
parent | fde9bf4470d4a3b6ee1da0dee2370ab028b6314a (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } |