From 544899f094c4d31ccacff394dd76384ed9b06d0c Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Wed, 12 Sep 2018 21:50:32 +0900 Subject: region: Do not release locale keys in IM hash table simple_locale is g_autofree and it should be duplicate for IM hash table. https://gitlab.gnome.org/GNOME/gnome-control-center/issues/185 --- panels/region/cc-input-chooser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'panels/region') diff --git a/panels/region/cc-input-chooser.c b/panels/region/cc-input-chooser.c index ab8a2eed2..674662052 100644 --- a/panels/region/cc-input-chooser.c +++ b/panels/region/cc-input-chooser.c @@ -884,7 +884,7 @@ get_locale_infos (GtkWidget *chooser) GList *l; priv->locales = g_hash_table_new_full (g_str_hash, g_str_equal, - NULL, locale_info_free); + g_free, locale_info_free); priv->locales_by_language = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_hash_table_destroy); @@ -919,7 +919,7 @@ get_locale_infos (GtkWidget *chooser) tmp = gnome_get_language_from_locale (simple_locale, "C"); info->untranslated_name = cc_util_normalize_casefold_and_unaccent (tmp); - g_hash_table_replace (priv->locales, simple_locale, info); + g_hash_table_replace (priv->locales, g_strdup (simple_locale), info); add_locale_to_table (priv->locales_by_language, lang_code, info); if (gnome_get_input_source_from_locale (simple_locale, &type, &id) && -- cgit v1.2.1