aboutsummaryrefslogtreecommitdiffstats
path: root/x11
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2007-03-23 07:53:26 +0800
committermarcus <marcus@FreeBSD.org>2007-03-23 07:53:26 +0800
commita32a7799549504e6a01d540cab06f6a447ad0ff9 (patch)
tree5c3829388e1674616d0caa974c07be70cb724b6a /x11
parente883e9e5c1e0dc5a9404f378f6ce8d5bcdc4af7d (diff)
downloadfreebsd-ports-gnome-a32a7799549504e6a01d540cab06f6a447ad0ff9.tar.gz
freebsd-ports-gnome-a32a7799549504e6a01d540cab06f6a447ad0ff9.tar.zst
freebsd-ports-gnome-a32a7799549504e6a01d540cab06f6a447ad0ff9.zip
Fix the invalid freeing of memory problem with the official patch to correct
a memory leak.
Diffstat (limited to 'x11')
-rw-r--r--x11/libgnomekbd/Makefile2
-rw-r--r--x11/libgnomekbd/files/patch-libgnomekbd_gkbd-indicator.c30
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);
+ }