mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 11:39:53 +00:00
vnc: fix double free issues
Reported by Coverity: CID 1371242, 1371243, 1371244. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Peter Maydell <peter.maydell@linaro.org> Cc: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 1487682332-29154-1-git-send-email-kraxel@redhat.com
This commit is contained in:
parent
8bf69b499a
commit
2dc120beb8
3
ui/vnc.c
3
ui/vnc.c
@ -3181,6 +3181,7 @@ static void vnc_display_close(VncDisplay *vd)
|
||||
g_free(vd->lsock);
|
||||
g_free(vd->lsock_tag);
|
||||
vd->lsock = NULL;
|
||||
vd->lsock_tag = NULL;
|
||||
vd->nlsock = 0;
|
||||
|
||||
for (i = 0; i < vd->nlwebsock; i++) {
|
||||
@ -3192,6 +3193,7 @@ static void vnc_display_close(VncDisplay *vd)
|
||||
g_free(vd->lwebsock);
|
||||
g_free(vd->lwebsock_tag);
|
||||
vd->lwebsock = NULL;
|
||||
vd->lwebsock_tag = NULL;
|
||||
vd->nlwebsock = 0;
|
||||
|
||||
vd->auth = VNC_AUTH_INVALID;
|
||||
@ -3204,6 +3206,7 @@ static void vnc_display_close(VncDisplay *vd)
|
||||
vd->tlsaclname = NULL;
|
||||
if (vd->lock_key_sync) {
|
||||
qemu_remove_led_event_handler(vd->led);
|
||||
vd->led = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user