aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2017-02-21 14:05:32 +0100
committerGerd Hoffmann <kraxel@redhat.com>2017-02-27 16:22:01 +0100
commit2dc120beb89b825033972db441ab540bcc42a17e (patch)
treee40c9943f9b8e0c39b1536b1bde8355abf9dc2c9 /ui
parent8bf69b499a5ef44b81fec6287df312f1f35d5725 (diff)
downloadqemu-2dc120beb89b825033972db441ab540bcc42a17e.zip
qemu-2dc120beb89b825033972db441ab540bcc42a17e.tar.gz
qemu-2dc120beb89b825033972db441ab540bcc42a17e.tar.bz2
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
Diffstat (limited to 'ui')
-rw-r--r--ui/vnc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/vnc.c b/ui/vnc.c
index 62e85ed..51f4b30 100644
--- a/ui/vnc.c
+++ b/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;
}
}