Fix possible leak of transitive dependency name.

If a transitive dependency appears twice, the original pointer will be
removed from the hash table. Since these names were created by
g_strsplit, they need to be freed, or they will leak.
parent 1f1e11f4
......@@ -562,7 +562,8 @@ g_irepository_get_dependencies (GIRepository *repository,
g_return_val_if_fail (typelib != NULL, NULL);
/* Load the dependencies. */
transitive_dependencies = g_hash_table_new (g_str_hash, g_str_equal);
transitive_dependencies = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, NULL);
get_typelib_dependencies_transitive (repository, typelib,
transitive_dependencies);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment