Message ID | 20220105020808.597325-1-lei.rao@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] ui/vnc.c: Fixed a deadlock bug. | expand |
diff --git a/ui/vnc.c b/ui/vnc.c index 1ed1c7efc6..3ccd33dedc 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -1354,12 +1354,12 @@ void vnc_disconnect_finish(VncState *vs) /* last client gone */ vnc_update_server_surface(vs->vd); } + vnc_unlock_output(vs); + if (vs->cbpeer.notifier.notify) { qemu_clipboard_peer_unregister(&vs->cbpeer); } - vnc_unlock_output(vs); - qemu_mutex_destroy(&vs->output_mutex); if (vs->bh != NULL) { qemu_bh_delete(vs->bh);