[gnome-control-center] region: Do not release locale keys in IM hash table
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] region: Do not release locale keys in IM hash table
- Date: Tue, 18 Sep 2018 06:16:21 +0000 (UTC)
commit 544899f094c4d31ccacff394dd76384ed9b06d0c
Author: Takao Fujiwara <tfujiwar redhat com>
Date: Wed Sep 12 21:50:32 2018 +0900
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(-)
---
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) &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]