提交 f3d58385 编写于 作者: M Marc-André Lureau 提交者: Gerd Hoffmann

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: NMarc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20180531195119.22021-2-marcandre.lureau@redhat.com
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 62713a2e
...@@ -102,7 +102,6 @@ static void qbus_realize(BusState *bus, DeviceState *parent, const char *name) ...@@ -102,7 +102,6 @@ static void qbus_realize(BusState *bus, DeviceState *parent, const char *name)
QLIST_INSERT_HEAD(&bus->parent->child_bus, bus, sibling); QLIST_INSERT_HEAD(&bus->parent->child_bus, bus, sibling);
bus->parent->num_child_bus++; bus->parent->num_child_bus++;
object_property_add_child(OBJECT(bus->parent), bus->name, OBJECT(bus), NULL); object_property_add_child(OBJECT(bus->parent), bus->name, OBJECT(bus), NULL);
object_unref(OBJECT(bus));
} else if (bus != sysbus_get_default()) { } else if (bus != sysbus_get_default()) {
/* TODO: once all bus devices are qdevified, /* TODO: once all bus devices are qdevified,
only reset handler for main_system_bus should be registered here. */ only reset handler for main_system_bus should be registered here. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册