qemu-trivial
[Top][All Lists]
Advanced

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

Re: [PATCH] vnc: Fix a memleak in vnc_display_connect()


From: Laurent Vivier
Subject: Re: [PATCH] vnc: Fix a memleak in vnc_display_connect()
Date: Tue, 12 Jan 2021 20:56:22 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

Le 26/11/2020 à 07:57, Alex Chen a écrit :
> Free the 'sioc' when the qio_channel_socket_connect_sync() fails.
> 
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Alex Chen <alex.chen@huawei.com>
> ---
>  ui/vnc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/ui/vnc.c b/ui/vnc.c
> index 49235056f7..dae56e9493 100644
> --- a/ui/vnc.c
> +++ b/ui/vnc.c
> @@ -3743,6 +3743,7 @@ static int vnc_display_connect(VncDisplay *vd,
>      sioc = qio_channel_socket_new();
>      qio_channel_set_name(QIO_CHANNEL(sioc), "vnc-reverse");
>      if (qio_channel_socket_connect_sync(sioc, saddr[0], errp) < 0) {
> +        object_unref(OBJECT(sioc));
>          return -1;
>      }
>      vnc_connect(vd, sioc, false, false);
> 

Applied to my trivial-patches branch.

Thanks,
Laurent




reply via email to

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