mirror of
https://github.com/qemu/qemu.git
synced 2026-04-05 22:00:58 +00:00
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:
committed by
Philippe Mathieu-Daudé
parent
ea24be6cdd
commit
34aad58901
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user