qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] vnc: fix unfinalized tlscreds for VncDisplay


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] vnc: fix unfinalized tlscreds for VncDisplay
Date: Mon, 11 Jan 2021 16:50:28 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

+Daniel

On 1/11/21 2:19 PM, Zihao Chang wrote:
> 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>
> ---
>  ui/vnc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ui/vnc.c b/ui/vnc.c
> index 7452ac7df2..69e92b1ef3 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) {
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]