mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 23:13:40 +02:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user