[virt-tools-list] [PATCH 07/11] virt-viewer-app: unref the session on dispose

Hans de Goede hdegoede at redhat.com
Sun Mar 4 19:05:58 UTC 2012


With this patch combined with the previous patches in this series, the
VirtViewerSession (finally) gets properly finalized on exit.

Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
 src/virt-viewer-app.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
index 6fb83f6..2a66142 100644
--- a/src/virt-viewer-app.c
+++ b/src/virt-viewer-app.c
@@ -1231,6 +1231,11 @@ virt_viewer_app_dispose (GObject *object)
         g_object_unref(priv->container);
         priv->container = NULL;
     }
+
+    if (priv->session) {
+        g_object_unref(priv->session);
+        priv->session = NULL;
+    }
     g_free(priv->title);
 
     virt_viewer_app_free_connect_info(self);
-- 
1.7.7.6




More information about the virt-tools-list mailing list