]> Git Repo - qemu.git/commitdiff
bus: do not unref the added child bus on realize
authorMarc-André Lureau <[email protected]>
Thu, 31 May 2018 19:51:16 +0000 (21:51 +0200)
committerGerd Hoffmann <[email protected]>
Tue, 12 Jun 2018 10:07:29 +0000 (12:07 +0200)
When the parent bus removes the child property, it takes care of
removing the added reference, in object_finalize_child_property().

Signed-off-by: Marc-André Lureau <[email protected]>
Message-id: 20180531195119[email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
hw/core/bus.c

index 4651f244864c309018ee4d1179e59fca6985e471..ad0c9df335fb3597c5dc4f9c0bed8bb67f4148d5 100644 (file)
@@ -102,7 +102,6 @@ static void qbus_realize(BusState *bus, DeviceState *parent, const char *name)
         QLIST_INSERT_HEAD(&bus->parent->child_bus, bus, sibling);
         bus->parent->num_child_bus++;
         object_property_add_child(OBJECT(bus->parent), bus->name, OBJECT(bus), NULL);
-        object_unref(OBJECT(bus));
     } else if (bus != sysbus_get_default()) {
         /* TODO: once all bus devices are qdevified,
            only reset handler for main_system_bus should be registered here. */
This page took 0.025785 seconds and 4 git commands to generate.