@samitouri / QOSamiQemu / commits / 7d949d9621

ui/dbus: implement display cleanup

Add dbus_cleanup() to unparent the D-Bus display object, ensuring proper teardown before user_creatable_cleanup() runs. Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-ID: <20260623-b4-ui-v4-21-4656aec3398d@redhat.com>

Marc-André Lureau committed Jun 23, 2026 at 11:44 UTC 7d949d96216d65490012fedcc9e715b7b30de794
1 file changed +13
ui/dbus.c
+13
@@ -615,10 +615,23 @@ static const TypeInfo dbus_display_info = {
615 }
616 };
617
618 +static void
619 +dbus_cleanup(void)
620 +{
621 + Object *o;
622 +
623 + o = object_resolve_path_component(object_get_objects_root(),
624 + "dbus-display");
625 + if (o) {
626 + object_unparent(o);
627 + }
628 +}
629 +
630 static QemuDisplay qemu_display_dbus = {
631 .type = DISPLAY_TYPE_DBUS,
632 .early_init = early_dbus_init,
633 .init = dbus_init,
634 + .cleanup = dbus_cleanup,
635 .vc = "vc",
636 };
637