mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-25 03:32:12 +01:00
girepository: Fix a minor string leak
Caught by the new unit tests. Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
parent
e699037fef
commit
95693f78fc
@ -129,7 +129,7 @@ gi_repository_init (GIRepository *repository)
|
|||||||
repository->priv = gi_repository_get_instance_private (repository);
|
repository->priv = gi_repository_get_instance_private (repository);
|
||||||
repository->priv->typelibs
|
repository->priv->typelibs
|
||||||
= g_hash_table_new_full (g_str_hash, g_str_equal,
|
= g_hash_table_new_full (g_str_hash, g_str_equal,
|
||||||
(GDestroyNotify) NULL,
|
(GDestroyNotify) g_free,
|
||||||
(GDestroyNotify) gi_typelib_free);
|
(GDestroyNotify) gi_typelib_free);
|
||||||
repository->priv->lazy_typelibs
|
repository->priv->lazy_typelibs
|
||||||
= g_hash_table_new_full (g_str_hash, g_str_equal,
|
= g_hash_table_new_full (g_str_hash, g_str_equal,
|
||||||
@ -441,7 +441,9 @@ register_internal (GIRepository *repository,
|
|||||||
else
|
else
|
||||||
key = build_typelib_key (namespace, source);
|
key = build_typelib_key (namespace, source);
|
||||||
|
|
||||||
g_hash_table_insert (repository->priv->typelibs, key, (void *)typelib);
|
g_hash_table_insert (repository->priv->typelibs,
|
||||||
|
g_steal_pointer (&key),
|
||||||
|
(void *)typelib);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* These types might be resolved now, clear the cache */
|
/* These types might be resolved now, clear the cache */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user