Plug a small memory leak
This commit is contained in:
parent
39ea91ab33
commit
9210ea3780
@ -1,6 +1,6 @@
|
||||
Name: libgnomekbd
|
||||
Version: 2.23.2
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: A keyboard configuration library
|
||||
|
||||
Group: System Environment/Libraries
|
||||
@ -27,6 +27,8 @@ Requires(pre): GConf2
|
||||
Requires(post): GConf2
|
||||
Requires(preun): GConf2
|
||||
|
||||
# http://bugzilla.gnome.org/show_bug.cgi?id=549874
|
||||
Patch0: list-leak.patch
|
||||
|
||||
%description
|
||||
The libgnomekbd package contains a GNOME library which manages
|
||||
@ -60,6 +62,7 @@ of the keyboard indicator applet.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p0 -b .list-leak
|
||||
|
||||
%build
|
||||
%configure --disable-static --enable-compile-warnings=no
|
||||
@ -129,6 +132,9 @@ touch --no-create %{_datadir}/icons/hicolor || :
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Aug 29 2008 Matthias Clasen <mclasen@redhat.com> - 2.23.2-2
|
||||
- Plug a small memory leak
|
||||
|
||||
* Sun May 11 2008 Matthias Clasen <mclasen@redhat.com> - 2.23.2-1
|
||||
- Update to 2.23.2
|
||||
|
||||
|
||||
62
list-leak.patch
Normal file
62
list-leak.patch
Normal file
@ -0,0 +1,62 @@
|
||||
Index: libgnomekbd/gkbd-keyboard-config.c
|
||||
===================================================================
|
||||
--- libgnomekbd/gkbd-keyboard-config.c (revision 302)
|
||||
+++ libgnomekbd/gkbd-keyboard-config.c (working copy)
|
||||
@@ -325,7 +325,7 @@
|
||||
{
|
||||
GError *gerror = NULL;
|
||||
gchar *pc;
|
||||
- GSList *pl;
|
||||
+ GSList *pl, *l;
|
||||
|
||||
pc = gconf_client_get_string (kbd_config->conf_client,
|
||||
param_names[0], &gerror);
|
||||
@@ -347,7 +347,7 @@
|
||||
|
||||
gkbd_keyboard_config_layouts_reset (kbd_config);
|
||||
|
||||
- pl = gconf_client_get_list (kbd_config->conf_client,
|
||||
+ l = pl = gconf_client_get_list (kbd_config->conf_client,
|
||||
param_names[1],
|
||||
GCONF_VALUE_STRING, &gerror);
|
||||
if (pl == NULL || gerror != NULL) {
|
||||
@@ -359,17 +359,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
- while (pl != NULL) {
|
||||
- xkl_debug (150, "Loaded Kbd layout: [%s]\n", pl->data);
|
||||
+ while (l != NULL) {
|
||||
+ xkl_debug (150, "Loaded Kbd layout: [%s]\n", l->data);
|
||||
gkbd_keyboard_config_layouts_add_full (kbd_config,
|
||||
- pl->data);
|
||||
- pl = pl->next;
|
||||
+ l->data);
|
||||
+ l = l->next;
|
||||
}
|
||||
gkbd_keyboard_config_string_list_reset (&pl);
|
||||
|
||||
gkbd_keyboard_config_options_reset (kbd_config);
|
||||
|
||||
- pl = gconf_client_get_list (kbd_config->conf_client,
|
||||
+ l = pl = gconf_client_get_list (kbd_config->conf_client,
|
||||
param_names[2],
|
||||
GCONF_VALUE_STRING, &gerror);
|
||||
if (pl == NULL || gerror != NULL) {
|
||||
@@ -381,12 +381,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
- while (pl != NULL) {
|
||||
- xkl_debug (150, "Loaded Kbd option: [%s]\n", pl->data);
|
||||
+ while (l != NULL) {
|
||||
+ xkl_debug (150, "Loaded Kbd option: [%s]\n", l->data);
|
||||
gkbd_keyboard_config_options_add_full (kbd_config,
|
||||
- (const gchar *) pl->
|
||||
+ (const gchar *) l->
|
||||
data);
|
||||
- pl = pl->next;
|
||||
+ l = l->next;
|
||||
}
|
||||
gkbd_keyboard_config_string_list_reset (&pl);
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user