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.ro...@huawei.com>
> Signed-off-by: Alex Chen <alex.c...@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