From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55513) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMs2r-00004r-8G for qemu-devel@nongnu.org; Tue, 12 Jul 2016 03:23:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMs2l-0001Rq-SV for qemu-devel@nongnu.org; Tue, 12 Jul 2016 03:23:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60357) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMs2l-0001Rj-Mr for qemu-devel@nongnu.org; Tue, 12 Jul 2016 03:23:47 -0400 From: Gerd Hoffmann Date: Tue, 12 Jul 2016 09:23:41 +0200 Message-Id: <1468308223-2496-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1468308223-2496-1-git-send-email-kraxel@redhat.com> References: <1468308223-2496-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 1/3] vnc: fix incorrect checking condition when updating client List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gonglei , Haibin Wang , Gerd Hoffmann From: Gonglei 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 --- ui/vnc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 1.8.3.1