aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-02-09 08:13:35 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-02-09 08:13:35 +0800
commit519d4a3de509e2e5120630ae56c06ded2f329f81 (patch)
tree1515fd93185745424a4138bd7bd5aab434b4de2a /e-util
parent67ce5f3b140525c2f5944270a9383616f9d67923 (diff)
downloadgsoc2013-evolution-519d4a3de509e2e5120630ae56c06ded2f329f81.tar.gz
gsoc2013-evolution-519d4a3de509e2e5120630ae56c06ded2f329f81.tar.zst
gsoc2013-evolution-519d4a3de509e2e5120630ae56c06ded2f329f81.zip
Fix a potential crasher in e_charset_add_radio_actions().
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-charset.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/e-util/e-charset.c b/e-util/e-charset.c
index ffee5a8f4a..d2b7a91eeb 100644
--- a/e-util/e-charset.c
+++ b/e-util/e-charset.c
@@ -228,10 +228,12 @@ e_charset_add_radio_actions (GtkActionGroup *action_group,
action = gtk_radio_action_new (
action_name, charset_label, NULL, NULL, def);
- /* Character set name is static so no need to free it. */
- g_object_set_data (
+ /* Character set name may NOT be static,
+ * so we do need to duplicate the string. */
+ g_object_set_data_full (
G_OBJECT (action), "charset",
- (gpointer) charset_name);
+ g_strdup (charset_name),
+ (GDestroyNotify) g_free);
gtk_radio_action_set_group (action, group);
group = gtk_radio_action_get_group (action);