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]>
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) {