From ad9ed2451356457afaceddc7d0dc6b8b74a83bf6 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Mon, 17 Aug 2009 16:36:51 +0100 Subject: Plug some leaks --- libempathy/empathy-account.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libempathy/empathy-account.c b/libempathy/empathy-account.c index ffb6e6786..ae17f8d6a 100644 --- a/libempathy/empathy-account.c +++ b/libempathy/empathy-account.c @@ -234,8 +234,11 @@ empathy_account_update (EmpathyAccount *account, } if (g_hash_table_lookup (properties, "DisplayName") != NULL) - priv->display_name = - g_strdup (tp_asv_get_string (properties, "DisplayName")); + { + g_free (priv->display_name); + priv->display_name = + g_strdup (tp_asv_get_string (properties, "DisplayName")); + } if (g_hash_table_lookup (properties, "Enabled") != NULL) { @@ -257,6 +260,9 @@ empathy_account_update (EmpathyAccount *account, parameters = tp_asv_get_boxed (properties, "Parameters", TP_HASH_TYPE_STRING_VARIANT_MAP); + if (priv->parameters != NULL) + g_hash_table_unref (priv->parameters); + priv->parameters = g_boxed_copy (TP_HASH_TYPE_STRING_VARIANT_MAP, parameters); } -- cgit v1.2.3