hw/char/virtio-console: clear dangling GLib event source tag

Clear dangling GLib event source tag when virtio-console is
unrealized. This prevents a stale tag from being used, and
maintains consistency with the rest of virtio-console.

Signed-off-by: Matthew Penney <matt@matthewpenney.net>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20260305213308.96441-1-matt@matthewpenney.net>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
Matthew Penney
2026-03-05 21:33:32 +00:00
committed by Philippe Mathieu-Daudé
parent ea24be6cdd
commit 34aad58901

View File

@@ -257,7 +257,7 @@ static void virtconsole_unrealize(DeviceState *dev)
VirtConsole *vcon = VIRTIO_CONSOLE(dev);
if (vcon->watch) {
g_source_remove(vcon->watch);
g_clear_handle_id(&vcon->watch, g_source_remove);
}
}