]> git.0d.be Git - empathy.git/commitdiff
fix hash table leak
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 8 Mar 2010 15:32:54 +0000 (16:32 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 15 Mar 2010 08:28:41 +0000 (09:28 +0100)
priv->favourites takes the reference of the newly created hash table so we
don't have to ref it.

libempathy/empathy-contact-manager.c

index 6ccd0899138e6a148347c1beca7962e427f9984f..d0ba13054753a78a9dcd4f69f91150973bee5ead 100644 (file)
@@ -303,9 +303,10 @@ add_contacts_to_favourites (EmpathyContactManager *self,
                contact_hash = g_hash_table_new_full (g_str_hash,
                                                      g_str_equal,
                                                      g_free, NULL);
+
                g_hash_table_insert (priv->favourites,
                                     g_strdup (account),
-                                    g_hash_table_ref (contact_hash));
+                                    contact_hash);
        }
 
        for (j = 0; contacts && contacts[j] != NULL; j++) {