[Spice-devel] [PATCH spice-gtk 15/15] channel-main: Free flushing list on agent reset and dispose

Hans de Goede hdegoede at redhat.com
Sat Mar 9 03:06:35 PST 2013


This fixes virt-viewer hanging when trying to quit with a file-xfer active.

Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
 gtk/channel-main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gtk/channel-main.c b/gtk/channel-main.c
index ad6c0c6..081e560 100644
--- a/gtk/channel-main.c
+++ b/gtk/channel-main.c
@@ -315,6 +315,7 @@ static void spice_main_channel_finalize(GObject *obj)
 
     g_free(c->agent_msg_data);
     agent_free_msg_queue(SPICE_MAIN_CHANNEL(obj));
+    g_slist_free_full(c->flushing, g_object_unref);
 
     if (G_OBJECT_CLASS(spice_main_channel_parent_class)->finalize)
         G_OBJECT_CLASS(spice_main_channel_parent_class)->finalize(obj);
@@ -358,6 +359,9 @@ static void spice_main_channel_reset_agent(SpiceMainChannel *channel)
         else
             file_xfer_completed(task, error);
     }
+
+    g_slist_free_full(c->flushing, g_object_unref);
+    c->flushing = NULL;
 }
 
 /* main or coroutine context */
-- 
1.8.1.4



More information about the Spice-devel mailing list