* [Qemu-devel] [PATCH] vnc: fix incorrect checking condition when updating client
@ 2016-07-08 3:37 Gonglei
2016-07-08 8:58 ` Daniel P. Berrange
0 siblings, 1 reply; 2+ messages in thread
From: Gonglei @ 2016-07-08 3:37 UTC (permalink / raw)
To: qemu-devel; +Cc: kraxel, berrange, Gonglei, Haibin Wang
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>
---
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.7.12.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] vnc: fix incorrect checking condition when updating client
2016-07-08 3:37 [Qemu-devel] [PATCH] vnc: fix incorrect checking condition when updating client Gonglei
@ 2016-07-08 8:58 ` Daniel P. Berrange
0 siblings, 0 replies; 2+ messages in thread
From: Daniel P. Berrange @ 2016-07-08 8:58 UTC (permalink / raw)
To: Gonglei; +Cc: qemu-devel, kraxel, Haibin Wang
On Fri, Jul 08, 2016 at 11:37:36AM +0800, Gonglei wrote:
> 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>
> ---
> ui/vnc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-08 8:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-08 3:37 [Qemu-devel] [PATCH] vnc: fix incorrect checking condition when updating client Gonglei
2016-07-08 8:58 ` Daniel P. Berrange
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.