]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-utils.c
libempathy: Fix several memory leaks from libgee
[empathy.git] / libempathy / empathy-utils.c
index 49a90f3b66b3c8f7a03f4dc38f244dc61353a5d8..4555d414493a53b49d302229fbc14bb84167a4dc 100644 (file)
@@ -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);
     }