mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-24 19:22:11 +01: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:
parent
4c0a8388d5
commit
d17edde568
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user