aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGonglei <arei.gonglei@huawei.com>2016-07-08 11:37:36 +0800
committerGerd Hoffmann <kraxel@redhat.com>2016-07-12 08:34:13 +0200
commit5a693efda84d7df5136cc2bd31c959bb1530b0c9 (patch)
tree79d2368f261ef83d1efbf5fa4e3f66fb1aec47cc
parentf1ef55786691a1bf79db0b74ba1e5347a0d38c1b (diff)
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>
-rw-r--r--ui/vnc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/vnc.c b/ui/vnc.c
index 18c0b56c3a..bd602b6c08 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -1025,7 +1025,7 @@ static int find_and_clear_dirty_height(VncState *vs,
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;