fix some memory leaks

epel9
Matthias Clasen 18 years ago
parent d6ec16615f
commit 4d3f1c29b0

@ -5,7 +5,7 @@
Summary: A process-transparent configuration system Summary: A process-transparent configuration system
Name: GConf2 Name: GConf2
Version: 2.19.1 Version: 2.19.1
Release: 3%{?dist} Release: 4%{?dist}
License: LGPLv2+ License: LGPLv2+
Group: System Environment/Base Group: System Environment/Base
Source: http://download.gnome.org/sources/GConf/2.19/GConf-%{version}.tar.bz2 Source: http://download.gnome.org/sources/GConf/2.19/GConf-%{version}.tar.bz2
@ -27,6 +27,9 @@ BuildRequires: intltool
Patch0: GConf-2.18.0.1-reload.patch Patch0: GConf-2.18.0.1-reload.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=356573 # http://bugzilla.gnome.org/show_bug.cgi?id=356573
Patch1: GConf2-2.14.0-timeout.patch Patch1: GConf2-2.14.0-timeout.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=475970
Patch2: sync-leak.patch
Patch3: dir-leak.patch
%description %description
GConf is a process-transparent configuration database API used to GConf is a process-transparent configuration database API used to
@ -63,6 +66,8 @@ which require GTK+.
%setup -q -n GConf-%{version} %setup -q -n GConf-%{version}
%patch0 -p1 -b .reload %patch0 -p1 -b .reload
%patch1 -p1 -b .timers %patch1 -p1 -b .timers
%patch2 -p1 -b .sync-leak
%patch3 -p1 -b .dir-leak
%build %build
rm -f libtool rm -f libtool
@ -124,6 +129,9 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/pkgconfig/* %{_libdir}/pkgconfig/*
%changelog %changelog
* Tue Sep 11 2007 Matthias Clasen <mclasen@redhat.com> - 2.19.1-4
- Fix memory leaks
* Thu Aug 23 2007 Adam Jackson <ajax@redhat.com> - 2.19.1-3 * Thu Aug 23 2007 Adam Jackson <ajax@redhat.com> - 2.19.1-3
- Rebuild for ppc toolchain bug - Rebuild for ppc toolchain bug

@ -0,0 +1,19 @@
diff -up GConf-2.19.1/backends/markup-tree.c.dir-leak GConf-2.19.1/backends/markup-tree.c
--- GConf-2.19.1/backends/markup-tree.c.dir-leak 2007-09-11 14:51:12.000000000 -0400
+++ GConf-2.19.1/backends/markup-tree.c 2007-09-11 14:52:30.000000000 -0400
@@ -263,6 +263,7 @@ markup_dir_free (MarkupDir *dir)
tmp = tmp->next;
}
+ g_slist_free (dir->entries);
tmp = dir->subdirs;
while (tmp)
@@ -273,6 +274,7 @@ markup_dir_free (MarkupDir *dir)
tmp = tmp->next;
}
+ g_slist_free (dir->subdirs);
g_free (dir->name);

@ -0,0 +1,11 @@
diff -up GConf-2.19.1/backends/xml-cache.c.leaks GConf-2.19.1/backends/xml-cache.c
--- GConf-2.19.1/backends/xml-cache.c.leaks 2007-09-11 10:54:43.000000000 -0400
+++ GConf-2.19.1/backends/xml-cache.c 2007-09-11 10:54:58.000000000 -0400
@@ -272,6 +272,7 @@ cache_sync (Cache *cache,
/* sync it all */
g_slist_foreach (list, (GFunc) cache_sync_foreach, &sd);
+ g_slist_free (list);
/* If we deleted some subdirs, we may now be able to delete
* more parent dirs. So go ahead and do the sync again.
Loading…
Cancel
Save