diff mbox series

[PULL,27/52] ui/console: free more QemuConsole resources

Message ID 20230904115251.4161397-28-marcandre.lureau@redhat.com
State New
Headers show
Series [PULL,01/52] ui: remove qemu_pixman_color() helper | expand

Commit Message

Marc-André Lureau Sept. 4, 2023, 11:52 a.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

This code path is probably not executed at this point, since console
aren't being released.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230830093843.3531473-28-marcandre.lureau@redhat.com>
---
 ui/console.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/ui/console.c b/ui/console.c
index ffa68c3a22..3cd4c74eec 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1337,8 +1337,11 @@  qemu_console_finalize(Object *obj)
 {
     QemuConsole *c = QEMU_CONSOLE(obj);
 
+    /* TODO: check this code path, and unregister from consoles */
+    g_clear_pointer(&c->device, object_unref);
+    g_clear_pointer(&c->surface, qemu_free_displaysurface);
+    g_clear_pointer(&c->gl_unblock_timer, timer_free);
     g_clear_pointer(&c->ui_timer, timer_free);
-    /* TODO: should unregister from consoles and free itself  */
 }
 
 static void