mirror of https://gitee.com/openkylin/qemu.git
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:
parent
22f84e73d8
commit
5d95ac5b64
2
vnc.c
2
vnc.c
|
@ -918,8 +918,8 @@ static void vnc_disconnect_finish(VncState *vs)
|
||||||
if (!vs->vd->clients)
|
if (!vs->vd->clients)
|
||||||
dcl->idle = 1;
|
dcl->idle = 1;
|
||||||
|
|
||||||
qemu_free(vs);
|
|
||||||
vnc_remove_timer(vs->vd);
|
vnc_remove_timer(vs->vd);
|
||||||
|
qemu_free(vs);
|
||||||
}
|
}
|
||||||
|
|
||||||
int vnc_client_io_error(VncState *vs, int ret, int last_errno)
|
int vnc_client_io_error(VncState *vs, int ret, int last_errno)
|
||||||
|
|
Loading…
Reference in New Issue