From c1e9dccddf8d6132493c6e4c599af49995058b2f Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 18 Sep 2008 18:45:02 +0000 Subject: [PATCH] pug a memory leak --- librsvg2.spec | 9 ++++++++- rsvg-better-free.patch | 16 ++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 rsvg-better-free.patch diff --git a/librsvg2.spec b/librsvg2.spec index 97daaa6..de52a85 100644 --- a/librsvg2.spec +++ b/librsvg2.spec @@ -13,12 +13,15 @@ Name: librsvg2 Summary: An SVG library based on cairo Version: 2.22.2 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ Group: System Environment/Libraries Source: http://download.gnome.org/sources/librsvg/2.22/librsvg-%{version}.tar.bz2 +# http://bugzilla.gnome.org/show_bug.cgi?id=475851 Patch1: filter-leak.patch +# http://bugzilla.gnome.org/show_bug.cgi?id=444444 +Patch2: rsvg-better-free.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: gtk2 >= %{gtk2_version} Requires: libxml2 >= %{libxml2_version} @@ -63,6 +66,7 @@ files to allow you to develop with librsvg. %prep %setup -q -n librsvg-%{version} %patch1 -p1 -b .filter-leak +%patch2 -p0 -b .rsvg-better-free %build %configure --with-svgz \ @@ -118,6 +122,9 @@ rm -rf $RPM_BUILD_ROOT %doc %{_datadir}/gtk-doc/html/rsvg %changelog +* Thu Sep 18 2008 Matthias Clasen - 2.22.2-2 +- Plug a memory leak + * Tue Mar 4 2008 Matthias Clasen - 2.22.2-1 - Update to 2.22.2 diff --git a/rsvg-better-free.patch b/rsvg-better-free.patch new file mode 100644 index 0000000..e32de43 --- /dev/null +++ b/rsvg-better-free.patch @@ -0,0 +1,16 @@ +Index: rsvg-image.c +=================================================================== +--- rsvg-image.c (revision 1176) ++++ rsvg-image.c (working copy) +@@ -472,9 +472,10 @@ + RsvgNodeImage *z = (RsvgNodeImage *) self; + rsvg_state_finalize (z->super.state); + g_free (z->super.state); ++ z->super.state = NULL; + if (z->img) + g_object_unref (G_OBJECT (z->img)); +- g_free (z); ++ _rsvg_node_free(self); + } + + static void