Re: [PATCH spice-gtk] spice-file-xfer-task: unref properties on dispose

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

 



> 
> When the construction properties are set, the objects are
> referenced by g_value_dup_object(), so they should be unref
> once the task is done.
> 
> If the main channel stays referenced, spice session fails
> to disconnect and the viewer does not close.
> 
> Signed-off-by: Jakub Janků <jjanku@xxxxxxxxxx>

Acked, good spot!

> ---
> 
> Hi,
> it seems a bit weird to me that this issue hasn't been reported
> and fixed yet. Is somebody able to reproduce?
> 
> 1) transfer file by drag&drop
> 2) try to close the viewer
> 

Yes, easy to reproduce.

OT: A similar behaviour happens also if we are not able to connect, I
remember this didn't happen in the past.

> ---
>  src/spice-file-transfer-task.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/spice-file-transfer-task.c b/src/spice-file-transfer-task.c
> index 90f31db..ca31b23 100644
> --- a/src/spice-file-transfer-task.c
> +++ b/src/spice-file-transfer-task.c
> @@ -648,6 +648,8 @@ spice_file_transfer_task_dispose(GObject *object)
>      g_clear_object(&self->file);
>      g_clear_object(&self->file_stream);
>      g_clear_error(&self->error);
> +    g_clear_object(&self->channel);
> +    g_clear_object(&self->cancellable);
>  
>      G_OBJECT_CLASS(spice_file_transfer_task_parent_class)->dispose(object);
>  }
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]