From 4d3f1c29b030fbae37283ea7eaab8d0887e4fdc7 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sep 11 2007 19:09:57 +0000 Subject: fix some memory leaks --- diff --git a/GConf2.spec b/GConf2.spec index 659b03d..73258d4 100644 --- a/GConf2.spec +++ b/GConf2.spec @@ -5,7 +5,7 @@ Summary: A process-transparent configuration system Name: GConf2 Version: 2.19.1 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPLv2+ Group: System Environment/Base 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 # http://bugzilla.gnome.org/show_bug.cgi?id=356573 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 GConf is a process-transparent configuration database API used to @@ -63,6 +66,8 @@ which require GTK+. %setup -q -n GConf-%{version} %patch0 -p1 -b .reload %patch1 -p1 -b .timers +%patch2 -p1 -b .sync-leak +%patch3 -p1 -b .dir-leak %build rm -f libtool @@ -124,6 +129,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/* %changelog +* Tue Sep 11 2007 Matthias Clasen - 2.19.1-4 +- Fix memory leaks + * Thu Aug 23 2007 Adam Jackson - 2.19.1-3 - Rebuild for ppc toolchain bug diff --git a/dir-leak.patch b/dir-leak.patch new file mode 100644 index 0000000..ded7374 --- /dev/null +++ b/dir-leak.patch @@ -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); + diff --git a/sync-leak.patch b/sync-leak.patch new file mode 100644 index 0000000..638991f --- /dev/null +++ b/sync-leak.patch @@ -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.