From: Gonglei Date: Fri, 8 Jul 2016 03:37:36 +0000 (+0800) Subject: vnc: fix incorrect checking condition when updating client X-Git-Tag: TizenStudio_2.0_p4.0~6^2~12^2~6^2~128^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5a693efda84d7df5136cc2bd31c959bb1530b0c9;p=sdk%2Femulator%2Fqemu.git 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 Signed-off-by: Gonglei Reviewed-by: Daniel P. Berrange Message-id: 1467949056-81208-1-git-send-email-arei.gonglei@huawei.com Signed-off-by: Gerd Hoffmann --- diff --git a/ui/vnc.c b/ui/vnc.c index 18c0b56..bd602b6 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;