diff options
author | Sergey V. Udaltsov <svu@src.gnome.org> | 2007-03-22 22:56:46 +0000 |
---|---|---|
committer | Sergey V. Udaltsov <svu@src.gnome.org> | 2007-03-22 22:56:46 +0000 |
commit | 92f9fa39766ab76642fcc7210bb52adaf39463b0 (patch) | |
tree | 476f1691a571990eb66e11e3574cec1b0ec67cd4 /libgnomekbd/gkbd-indicator.c | |
parent | 94e8afbe54cead05e69ec24d4318f091e8afcfbb (diff) | |
download | libgnomekbd-92f9fa39766ab76642fcc7210bb52adaf39463b0.tar.gz |
fixing invalid free() issue, b.g.o#421252
svn path=/trunk/; revision=67
Diffstat (limited to 'libgnomekbd/gkbd-indicator.c')
-rw-r--r-- | libgnomekbd/gkbd-indicator.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libgnomekbd/gkbd-indicator.c b/libgnomekbd/gkbd-indicator.c index 7dad71d..323f5d8 100644 --- a/libgnomekbd/gkbd-indicator.c +++ b/libgnomekbd/gkbd-indicator.c @@ -269,13 +269,18 @@ gkbd_indicator_prepare_drawing (GkbdIndicator * gki, int group) (full_layout_name, &layout_name, &variant_name)) /* just in case */ - layout_name = g_strdup (full_layout_name); + layout_name = full_layout_name; + + /* make it freeable */ + layout_name = g_strdup (layout_name); if (globals.short_group_names != NULL) { char *short_group_name = globals.short_group_names[group]; if (short_group_name != NULL && *short_group_name != '\0') { + /* drop the long name */ + g_free (layout_name); layout_name = g_strdup (short_group_name); } |