Skip to content

Commit 1c57ced

Browse files
gongleiareimdroth
authored andcommitted
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 <[email protected]> Signed-off-by: Gonglei <[email protected]> Reviewed-by: Daniel P. Berrange <[email protected]> Message-id: [email protected] Signed-off-by: Gerd Hoffmann <[email protected]> (cherry picked from commit 5a693ef) Signed-off-by: Michael Roth <[email protected]>
1 parent 98b8129 commit 1c57ced

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/vnc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ static int vnc_update_client(VncState *vs, int has_dirty, bool sync)
10411041
}
10421042

10431043
vs->has_dirty += has_dirty;
1044-
if (vs->need_update && vs->ioc != NULL) {
1044+
if (vs->need_update && !vs->disconnecting) {
10451045
VncDisplay *vd = vs->vd;
10461046
VncJob *job;
10471047
int y;

0 commit comments

Comments
 (0)