From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gonglei <arei.gonglei@huawei.com>,
Haibin Wang <wanghaibin.wang@huawei.com>,
Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PULL 1/3] vnc: fix incorrect checking condition when updating client
Date: Tue, 12 Jul 2016 09:23:41 +0200 [thread overview]
Message-ID: <1468308223-2496-2-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1468308223-2496-1-git-send-email-kraxel@redhat.com>
From: Gonglei <arei.gonglei@huawei.com>
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>
---
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
next prev parent reply other threads:[~2016-07-12 7:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-12 7:23 [Qemu-devel] [PULL 0/3] vnc: misc bugfixes Gerd Hoffmann
2016-07-12 7:23 ` Gerd Hoffmann [this message]
2016-07-12 7:23 ` [Qemu-devel] [PULL 2/3] vnc-enc-tight: use thread local storage for palette Gerd Hoffmann
2016-07-12 7:23 ` [Qemu-devel] [PULL 3/3] ui: avoid crash if vnc client disconnects with writes pending Gerd Hoffmann
2016-07-12 9:58 ` [Qemu-devel] [PULL 0/3] vnc: misc bugfixes Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1468308223-2496-2-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=arei.gonglei@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=wanghaibin.wang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).