mirror of https://github.com/GNOME/gimp.git
app: don't use g_free() as key_destroy_func in a GType-keyed hash table
This would have crashed if we ever replaced or removed something in that hash table. Instead, use g_object_unref() as value_destroy_func because the table keeps GimpContainers which we would leak if we ever removed anything from the table.
This commit is contained in:
parent
ddda6a15c3
commit
bbde1c48bd
|
@ -267,8 +267,8 @@ gimp_gegl_get_config_container (GType config_type)
|
|||
if (! config_containers)
|
||||
config_containers = g_hash_table_new_full (g_direct_hash,
|
||||
g_direct_equal,
|
||||
(GDestroyNotify) g_free,
|
||||
NULL);
|
||||
NULL,
|
||||
(GDestroyNotify) g_object_unref);
|
||||
|
||||
container = g_hash_table_lookup (config_containers, (gpointer) config_type);
|
||||
|
||||
|
|
Loading…
Reference in New Issue