Mercurial > ~mikael > mcabber > hg
diff mcabber/mcabber/caps.c @ 2212:778280b01bcb
Fix a few memory leaks
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Thu, 05 Nov 2015 15:08:47 +0100 |
parents | 01485f807811 |
children | fa516ef22145 |
line wrap: on
line diff
--- a/mcabber/mcabber/caps.c Sun Oct 25 14:55:12 2015 +0100 +++ b/mcabber/mcabber/caps.c Thu Nov 05 15:08:47 2015 +0100 @@ -101,7 +101,7 @@ c->features = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); c->identities = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, identity_destroy); c->forms = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, form_destroy); - g_hash_table_insert(caps_cache, g_strdup(hash), c); + g_hash_table_replace(caps_cache, g_strdup(hash), c); } void caps_remove(const char *hash)