summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiovanni Campagna <gcampagna@src.gnome.org>2012-07-07 17:57:40 -0400
committerRay Strode <rstrode@redhat.com>2012-07-13 15:21:52 -0400
commit869722748bbaa42a5103b8aa3bd8d8f112c48abc (patch)
treea23b63dcd543a0336ea748e0a03a711b876b5bee
parentd7aa0299a82bb7d129afd3dda92b91b3654fff0b (diff)
downloadgdm-869722748bbaa42a5103b8aa3bd8d8f112c48abc.tar.gz
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.
-rw-r--r--daemon/gdm-manager.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index ab0c9c1c..65f13189 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);