aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2018-05-31 21:51:16 +0200
committerGerd Hoffmann <kraxel@redhat.com>2018-06-12 12:07:29 +0200
commitf3d58385a6d3d82f65db602c5506e2d3d8c82394 (patch)
treee8ffa52e66affeb9c30b4335c7f185ba66d537ad
parent62713a2e50f653162387451034f1a2490e87be88 (diff)
downloadqemu-f3d58385a6d3d82f65db602c5506e2d3d8c82394.zip
qemu-f3d58385a6d3d82f65db602c5506e2d3d8c82394.tar.gz
qemu-f3d58385a6d3d82f65db602c5506e2d3d8c82394.tar.bz2
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>
-rw-r--r--hw/core/bus.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/hw/core/bus.c b/hw/core/bus.c
index 4651f24..ad0c9df 100644
--- a/hw/core/bus.c
+++ b/hw/core/bus.c
@@ -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. */