diff options
author | Gonglei <arei.gonglei@huawei.com> | 2016-07-08 11:37:36 +0800 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2016-09-28 10:50:25 -0500 |
commit | 1c57ced0c47f2df8fc06b2f697a399074d715f94 (patch) | |
tree | 54cd1238b7212aad64031d3b14298e93111e9cd3 | |
parent | 98b81297bfa7a1a7acfd8689f7c6447cbc128bfa (diff) | |
download | qemu-1c57ced0c47f2df8fc06b2f697a399074d715f94.zip qemu-1c57ced0c47f2df8fc06b2f697a399074d715f94.tar.gz qemu-1c57ced0c47f2df8fc06b2f697a399074d715f94.tar.bz2 |
vnc: fix incorrect checking condition when updating client
vs->disconnecting is set to TRUE and vs->ioc is closed, but
vs->ioc isn't set to NULL, so that the vnc_disconnect_finish()
isn't invoked when you update client in vnc_update_client()
after vnc_disconnect_start invoked. Let's using change the checking
condition to avoid resource leak.
Signed-off-by: Haibin Wang <wanghaibin.wang@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1467949056-81208-1-git-send-email-arei.gonglei@huawei.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit 5a693efda84d7df5136cc2bd31c959bb1530b0c9)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-rw-r--r-- | ui/vnc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1041,7 +1041,7 @@ static int vnc_update_client(VncState *vs, int has_dirty, bool sync) } vs->has_dirty += has_dirty; - if (vs->need_update && vs->ioc != NULL) { + if (vs->need_update && !vs->disconnecting) { VncDisplay *vd = vs->vd; VncJob *job; int y; |