fix use after free

We are using the vs structure when it was just freed. Classic use after free,
fix it.

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
Glauber Costa 2009-09-25 08:30:57 -04:00 committed by Aurelien Jarno
parent 22f84e73d8
commit 5d95ac5b64
1 changed files with 1 additions and 1 deletions

2
vnc.c
View File

@ -918,8 +918,8 @@ static void vnc_disconnect_finish(VncState *vs)
if (!vs->vd->clients)
dcl->idle = 1;
qemu_free(vs);
vnc_remove_timer(vs->vd);
qemu_free(vs);
}
int vnc_client_io_error(VncState *vs, int ret, int last_errno)