mirror of https://gitee.com/openkylin/qemu.git
bus: do not unref the added child bus on realize
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 <marcandre.lureau@redhat.com> Message-id: 20180531195119.22021-2-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
62713a2e50
commit
f3d58385a6
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue