[Spice-devel] [PATCH spice-gtk] spice-file-xfer-task: unref properties on dispose
Frediano Ziglio
fziglio at redhat.com
Wed Jul 31 09:27:41 UTC 2019
>
> 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 at redhat.com>
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);
> }
More information about the Spice-devel
mailing list