diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2007-03-22 23:53:26 +0000 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2007-03-22 23:53:26 +0000 |
commit | 516b5345a51a7db227ba43f825f5e1e3e17fcb14 (patch) | |
tree | afa2ac32e6b39e6bd8a6221af6291021e3a939cf /x11/libgnomekbd | |
parent | Protect the check for the mode argument to open with a test to make (diff) |
Fix the invalid freeing of memory problem with the official patch to correct
a memory leak.
Notes
Notes:
svn path=/head/; revision=188065
Diffstat (limited to 'x11/libgnomekbd')
-rw-r--r-- | x11/libgnomekbd/Makefile | 2 | ||||
-rw-r--r-- | x11/libgnomekbd/files/patch-libgnomekbd_gkbd-indicator.c | 30 |
2 files changed, 18 insertions, 14 deletions
diff --git a/x11/libgnomekbd/Makefile b/x11/libgnomekbd/Makefile index 74ffc31b1314..91137118ae34 100644 --- a/x11/libgnomekbd/Makefile +++ b/x11/libgnomekbd/Makefile @@ -8,7 +8,7 @@ PORTNAME= libgnomekbd PORTVERSION= 2.18.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11 gnome MASTER_SITES= GNOME DIST_SUBDIR= gnome2 diff --git a/x11/libgnomekbd/files/patch-libgnomekbd_gkbd-indicator.c b/x11/libgnomekbd/files/patch-libgnomekbd_gkbd-indicator.c index 5c2d4918c2c8..28c2db8c92f1 100644 --- a/x11/libgnomekbd/files/patch-libgnomekbd_gkbd-indicator.c +++ b/x11/libgnomekbd/files/patch-libgnomekbd_gkbd-indicator.c @@ -1,18 +1,22 @@ ---- libgnomekbd/gkbd-indicator.c.orig Wed Mar 21 17:11:21 2007 -+++ libgnomekbd/gkbd-indicator.c Wed Mar 21 17:11:23 2007 -@@ -265,11 +265,14 @@ gkbd_indicator_prepare_drawing (GkbdIndi - layouts_variants, - group); - char *variant_name; -+ char *layout_name_ptr; - if (!gkbd_keyboard_config_split_items -- (full_layout_name, &layout_name, -+ (full_layout_name, &layout_name_ptr, +--- libgnomekbd/gkbd-indicator.c 2006/10/28 21:08:20 18 ++++ libgnomekbd/gkbd-indicator.c 2007/03/22 22:56:46 67 +@@ -269,13 +269,18 @@ + (full_layout_name, &layout_name, &variant_name)) /* just in case */ - layout_name = g_strdup (full_layout_name); -+ else -+ layout_name = g_strdup (layout_name_ptr); +- 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); + } |