[dconf/f18] Fix a memory leak

Matthias Clasen mclasen at fedoraproject.org
Sun Oct 21 17:30:06 UTC 2012


commit 4d3007d321075ab33c17aa32c0eede125bf64b2c
Author: Matthias Clasen <mclasen at redhat.com>
Date:   Sun Oct 21 13:30:38 2012 -0400

    Fix a memory leak

 ...builder_get_parent-don-t-leak-parent_name.patch |   27 ++++++++++++++++++++
 dconf.spec                                         |    9 ++++++-
 2 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/0001-dconf_rebuilder_get_parent-don-t-leak-parent_name.patch b/0001-dconf_rebuilder_get_parent-don-t-leak-parent_name.patch
new file mode 100644
index 0000000..f87292e
--- /dev/null
+++ b/0001-dconf_rebuilder_get_parent-don-t-leak-parent_name.patch
@@ -0,0 +1,27 @@
+From f732fba794d380a6c70ce7f82c3326a484909fba Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen at redhat.com>
+Date: Sun, 21 Oct 2012 12:50:19 -0400
+Subject: [PATCH] dconf_rebuilder_get_parent: don't leak parent_name
+
+Leak introduced in facae6ffcd5b2935f9b708eecb1fd5aa7c8ddf86.
+Tracked down by Fabien Tassin in
+https://bugzilla.gnome.org/show_bug.cgi?id=686573
+---
+ service/dconf-rebuilder.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/service/dconf-rebuilder.c b/service/dconf-rebuilder.c
+index 3f170d6..2b79e18 100644
+--- a/service/dconf-rebuilder.c
++++ b/service/dconf-rebuilder.c
+@@ -57,6 +57,7 @@ dconf_rebuilder_get_parent (GHashTable  *table,
+       if (grandparent != NULL)
+         gvdb_item_set_parent (parent, grandparent);
+     }
++  g_free (parent_name);
+ 
+   return parent;
+ }
+-- 
+1.7.12.1
+
diff --git a/dconf.spec b/dconf.spec
index 0efe864..593b794 100644
--- a/dconf.spec
+++ b/dconf.spec
@@ -3,7 +3,7 @@
 
 Name:           dconf
 Version:        0.14.0
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        A configuration system
 
 Group:          System Environment/Base
@@ -22,6 +22,9 @@ BuildRequires:  intltool
 
 Requires:       dbus
 
+# upstream fix
+Patch0: 0001-dconf_rebuilder_get_parent-don-t-leak-parent_name.patch
+
 %description
 dconf is a low-level configuration system. Its main purpose is to provide a
 backend to the GSettings API in GLib.
@@ -47,6 +50,7 @@ dconf-editor allows you to browse and modify dconf databases.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %configure --disable-static
@@ -111,6 +115,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || :
 %{_datadir}/icons/hicolor/*/apps/dconf-editor.png
 
 %changelog
+* Sun Oct 21 2012 Matthias Clasen <mclasen at redhat.com> - 0.14.0-2
+- Fix a memory leak
+
 * Thu Sep 27 2012 Richard Hughes <hughsient at gmail.com> - 0.14.0-1
 - Update to 0.14.0
 


More information about the scm-commits mailing list