diff options
author | Zihao Chang | 2021-01-11 14:19:11 +0100 |
---|---|---|
committer | Gerd Hoffmann | 2021-01-15 11:22:42 +0100 |
commit | 521534df57cc0bee7b0da9e69fbbaa7149036ddb (patch) | |
tree | 239e099844b291d1bbf84d927701645e92ea972e /ui/vnc.c | |
parent | ui/gtk: update monitor interval on egl displays (diff) | |
download | qemu-521534df57cc0bee7b0da9e69fbbaa7149036ddb.tar.gz qemu-521534df57cc0bee7b0da9e69fbbaa7149036ddb.tar.xz qemu-521534df57cc0bee7b0da9e69fbbaa7149036ddb.zip |
vnc: fix unfinalized tlscreds for VncDisplay
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 <changzihao1@huawei.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20210111131911.805-1-changzihao1@huawei.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/vnc.c')
-rw-r--r-- | ui/vnc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) { |