]> Git Repo - qemu.git/commitdiff
vnc: fix unfinalized tlscreds for VncDisplay
authorZihao Chang <[email protected]>
Mon, 11 Jan 2021 13:19:11 +0000 (21:19 +0800)
committerGerd Hoffmann <[email protected]>
Fri, 15 Jan 2021 10:22:42 +0000 (11:22 +0100)
In vnc_display_open(), if tls-creds is enabled, do object_ref(object
ref 1->2) for tls-creds. While in vnc_display_close(), object_unparent
sets object ref to 1(2->1) and  unparent the object for root.
Problem:
1. the object can not be found from the objects_root, while the object
is not finalized.
2. the qemu_opts of tls-creds(id: creds0) is not deleted, so new tls
object with the same id(creds0) can not be delete & add.

Signed-off-by: Zihao Chang <[email protected]>
Reviewed-by: Daniel P. BerrangĂ© <[email protected]>
Message-Id: <20210111131911[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
ui/vnc.c

index 7452ac7df2cef44f59d0c4df9877f10b0947281a..69e92b1ef361f4be7f41cc8c21e888765ae09e73 100644 (file)
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -3234,7 +3234,7 @@ static void vnc_display_close(VncDisplay *vd)
     vd->auth = VNC_AUTH_INVALID;
     vd->subauth = VNC_AUTH_INVALID;
     if (vd->tlscreds) {
-        object_unparent(OBJECT(vd->tlscreds));
+        object_unref(OBJECT(vd->tlscreds));
         vd->tlscreds = NULL;
     }
     if (vd->tlsauthz) {
This page took 0.029724 seconds and 4 git commands to generate.