[gdm/wip/slave-connection: 4/36] manager: plug small memory leak
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/wip/slave-connection: 4/36] manager: plug small memory leak
- Date: Thu, 12 Jul 2012 22:27:20 +0000 (UTC)
commit 106d4c7add2fc70281c795c1d87ffe1310a7105a
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]