[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/11] vnc: fix unfinalized tlscreds for VncDisplay
From: |
Gerd Hoffmann |
Subject: |
[PULL 06/11] vnc: fix unfinalized tlscreds for VncDisplay |
Date: |
Fri, 15 Jan 2021 11:24:19 +0100 |
From: Zihao Chang <changzihao1@huawei.com>
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>
---
ui/vnc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/vnc.c b/ui/vnc.c
index 7452ac7df2ce..69e92b1ef361 100644
--- 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) {
--
2.29.2
- [PULL 00/11] Ui 20210115 patches, Gerd Hoffmann, 2021/01/15
- [PULL 02/11] ui/gtk: rename variable window to widget, Gerd Hoffmann, 2021/01/15
- [PULL 01/11] ui/gtk: don't try to redefine SI prefixes, Gerd Hoffmann, 2021/01/15
- [PULL 03/11] ui/gtk: limit virtual console max update interval, Gerd Hoffmann, 2021/01/15
- [PULL 04/11] ui/gtk: expose gd_monitor_update_interval, Gerd Hoffmann, 2021/01/15
- [PULL 10/11] vnc: move initialization to framebuffer_update_request, Gerd Hoffmann, 2021/01/15
- [PULL 07/11] ui: add support for remote power control to VNC server, Gerd Hoffmann, 2021/01/15
- [PULL 08/11] vnc: Fix a memleak in vnc_display_connect(), Gerd Hoffmann, 2021/01/15
- [PULL 05/11] ui/gtk: update monitor interval on egl displays, Gerd Hoffmann, 2021/01/15
- [PULL 11/11] vnc: add support for extended desktop resize, Gerd Hoffmann, 2021/01/15
- [PULL 06/11] vnc: fix unfinalized tlscreds for VncDisplay,
Gerd Hoffmann <=
- [PULL 09/11] vnc: move check into vnc_cursor_define, Gerd Hoffmann, 2021/01/15
- Re: [PULL 00/11] Ui 20210115 patches, Peter Maydell, 2021/01/15