[Spice-devel] [PATCH spice-gtk] spice-file-xfer-task: unref properties on dispose
Jakub Janků
jjanku at redhat.com
Wed Jul 31 08:47:52 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>
---
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
---
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);
}
--
2.21.0
More information about the Spice-devel
mailing list