[gdm/wip/slave-connection: 6/33] manager: plug small memory leak



commit bcd2ee18e005ed48e7bab2d653c8025e0ac36aaf
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Sat Jul 7 17:57:40 2012 -0400

    manager: plug small memory leak
    
    The finalize handler for GdmManager wasn't properly unreffing its
    DBus connection or local display factory.
    
    This commit fixes that up, and changes the free call for the
    xdmcp_factory call to match the style of the newly added free calls.

 daemon/gdm-manager.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index ab0c9c1..65f1318 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -441,10 +441,10 @@ gdm_manager_finalize (GObject *object)
         g_return_if_fail (manager->priv != NULL);
 
 #ifdef HAVE_LIBXDMCP
-        if (manager->priv->xdmcp_factory != NULL) {
-                g_object_unref (manager->priv->xdmcp_factory);
-        }
+        g_clear_object (&manager->priv->xdmcp_factory);
 #endif
+        g_clear_object (&manager->priv->local_factory);
+        g_clear_object (&manager->priv->connection);
 
         gdm_display_store_clear (manager->priv->display_store);
         g_object_unref (manager->priv->display_store);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]