diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2013-10-18 21:26:43 +0800 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2013-10-22 17:36:18 +0800 |
commit | 35b9f0c90f66e81f5008ff866b5b4b4b47aae0a5 (patch) | |
tree | 0dd29aaae33cd89bd5339162636a2b76355cf68d /libempathy | |
parent | 5d618c618444363615431646471df7670ed76cf1 (diff) | |
download | gsoc2013-empathy-35b9f0c90f66e81f5008ff866b5b4b4b47aae0a5.tar gsoc2013-empathy-35b9f0c90f66e81f5008ff866b5b4b4b47aae0a5.tar.gz gsoc2013-empathy-35b9f0c90f66e81f5008ff866b5b4b4b47aae0a5.tar.bz2 gsoc2013-empathy-35b9f0c90f66e81f5008ff866b5b4b4b47aae0a5.tar.lz gsoc2013-empathy-35b9f0c90f66e81f5008ff866b5b4b4b47aae0a5.tar.xz gsoc2013-empathy-35b9f0c90f66e81f5008ff866b5b4b4b47aae0a5.tar.zst gsoc2013-empathy-35b9f0c90f66e81f5008ff866b5b4b4b47aae0a5.zip |
libempathy: Fix several memory leaks from libgee
See commit 039dc326208e02b687e93739434e27a867f4ffa7.
https://bugzilla.gnome.org/show_bug.cgi?id=710453
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-individual-manager.c | 9 | ||||
-rw-r--r-- | libempathy/empathy-utils.c | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/libempathy/empathy-individual-manager.c b/libempathy/empathy-individual-manager.c index b3797c3b6..c56f6bb16 100644 --- a/libempathy/empathy-individual-manager.c +++ b/libempathy/empathy-individual-manager.c @@ -394,7 +394,7 @@ aggregator_individuals_changed_cb (FolksIndividualAggregator *aggregator, /* Make sure we handle each added individual only once. */ if (ind == NULL || g_list_find (added_set, ind) != NULL) - continue; + goto while_next; added_set = g_list_prepend (added_set, ind); g_signal_connect (ind, "notify::personas", @@ -406,6 +406,7 @@ aggregator_individuals_changed_cb (FolksIndividualAggregator *aggregator, added_filtered = g_list_prepend (added_filtered, ind); } +while_next: g_clear_object (&ind); } g_clear_object (&iter); @@ -829,19 +830,21 @@ empathy_individual_manager_set_blocked (EmpathyIndividualManager *self, tp_contact = tpf_persona_get_contact (persona); if (tp_contact == NULL) - continue; + goto while_next; conn = tp_contact_get_connection (tp_contact); if (!tp_proxy_has_interface_by_id (conn, TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACT_BLOCKING)) - continue; + goto while_next; if (blocked) tp_contact_block_async (tp_contact, abusive, NULL, NULL); else tp_contact_unblock_async (tp_contact, NULL, NULL); } + +while_next: g_clear_object (&persona); } g_clear_object (&iter); diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c index 49a90f3b6..4555d4144 100644 --- a/libempathy/empathy-utils.c +++ b/libempathy/empathy-utils.c @@ -560,7 +560,9 @@ empathy_dup_persona_store_for_connection (TpConnection *connection) account = tpf_persona_store_get_account (persona_store); conn_cur = tp_account_get_connection (account); if (conn_cur == connection) - result = persona_store; + result = g_object_ref (persona_store); + + g_clear_object (&persona_store); } g_clear_object (&iter); } |