aboutsummaryrefslogtreecommitdiff
path: root/vnc.c
diff options
context:
space:
mode:
authorGlauber Costa <glommer@redhat.com>2009-09-25 08:30:57 -0400
committerAurelien Jarno <aurelien@aurel32.net>2009-09-25 18:26:59 +0200
commit5d95ac5b6475c3b6b0e36b5f04de49bba88b3e59 (patch)
tree5a397b7283afc54e4ab019ebb67a0b2476863c9f /vnc.c
parent22f84e73d81a1b99a48b9bc4e3663fdfadfa7da1 (diff)
downloadqemu-5d95ac5b6475c3b6b0e36b5f04de49bba88b3e59.zip
qemu-5d95ac5b6475c3b6b0e36b5f04de49bba88b3e59.tar.gz
qemu-5d95ac5b6475c3b6b0e36b5f04de49bba88b3e59.tar.bz2
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>
Diffstat (limited to 'vnc.c')
-rw-r--r--vnc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vnc.c b/vnc.c
index 5eaef6a..592c9b3 100644
--- a/vnc.c
+++ b/vnc.c
@@ -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)