[Spice-devel] [spice-gtk v1 05/10] file-transfer: Fix SpiceFileTransferTask::file_stream leak

Victor Toso victortoso at redhat.com
Fri Jul 29 22:26:26 UTC 2016


From: Christophe Fergeau <cfergeau at redhat.com>

g_file_read_finish() is (transfer full) so we must release the ref
we got in _dispose() as it's not done anywhere else in the code.
---
 src/spice-file-transfer-task.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/spice-file-transfer-task.c b/src/spice-file-transfer-task.c
index 90c2a5d..ea46c9d 100644
--- a/src/spice-file-transfer-task.c
+++ b/src/spice-file-transfer-task.c
@@ -588,6 +588,7 @@ spice_file_transfer_task_dispose(GObject *object)
     SpiceFileTransferTask *self = SPICE_FILE_TRANSFER_TASK(object);
 
     g_clear_object(&self->file);
+    g_clear_object(&self->file_stream);
 
     G_OBJECT_CLASS(spice_file_transfer_task_parent_class)->dispose(object);
 }
-- 
2.7.4



More information about the Spice-devel mailing list