summaryrefslogtreecommitdiff
path: root/panels/region
diff options
context:
space:
mode:
authorTakao Fujiwara <tfujiwar@redhat.com>2018-09-12 21:50:32 +0900
committerRobert Ancell <robert.ancell@canonical.com>2018-09-18 08:07:25 +0200
commit544899f094c4d31ccacff394dd76384ed9b06d0c (patch)
tree9d7320f4fb3b967b0f366fc73ca55fac3dfb932c /panels/region
parent8798f8281c1b218eeb57896b94331c10ded71fc3 (diff)
downloadgnome-control-center-544899f094c4d31ccacff394dd76384ed9b06d0c.tar.gz
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
Diffstat (limited to 'panels/region')
-rw-r--r--panels/region/cc-input-chooser.c4
1 files changed, 2 insertions, 2 deletions
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) &&