+2008-10-20 Christian Persch <chpe@gnome.org>
+
+ Bug 557087 – mem leak in g_content_types_get_registered
+
+ * gio/gcontenttype.c: Plug a mem leak.
+
2008-10-19 Michael Natterer <mitch@imendio.com>
Bug 556186 – gpoll.h breaks gmain.h inclusion
if (g_str_has_suffix (ent->d_name, ".xml"))
{
mimetype = g_strdup_printf ("%s/%.*s", prefix, (int) strlen (ent->d_name) - 4, ent->d_name);
- g_hash_table_insert (mimetypes, mimetype, NULL);
+ g_hash_table_replace (mimetypes, mimetype, NULL);
}
}
closedir (d);
int i;
GList *l;
- mimetypes = g_hash_table_new (g_str_hash, g_str_equal);
+ mimetypes = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
enumerate_mimetypes_dir (g_get_user_data_dir (), mimetypes);
dirs = g_get_system_data_dirs ();
l = NULL;
g_hash_table_iter_init (&iter, mimetypes);
while (g_hash_table_iter_next (&iter, &key, NULL))
- l = g_list_prepend (l, key);
+ {
+ l = g_list_prepend (l, key);
+ g_hash_table_iter_steal (&iter);
+ }
g_hash_table_destroy (mimetypes);