[Spice-commits] src/spice-file-transfer-task.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jul 31 09:26:02 UTC 2019


 src/spice-file-transfer-task.c |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 73ef35f94442b30f7f33a9643a30f4f0d74bc0e0
Author: Jakub Janků <jjanku at redhat.com>
Date:   Wed Jul 31 10:47:52 2019 +0200

    spice-file-xfer-task: unref properties on dispose
    
    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-by: Frediano Ziglio <fziglio at redhat.com>

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-commits mailing list