From 5d95ac5b6475c3b6b0e36b5f04de49bba88b3e59 Mon Sep 17 00:00:00 2001 From: Glauber Costa Date: Fri, 25 Sep 2009 08:30:57 -0400 Subject: 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 Signed-off-by: Aurelien Jarno --- vnc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vnc.c') 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) -- cgit v1.1