pug a memory leak

This commit is contained in:
Matthias Clasen 2008-09-18 18:45:02 +00:00
parent c2eb3a44d5
commit c1e9dccddf
2 changed files with 24 additions and 1 deletions

View File

@ -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 <mclasen@redhat.com> - 2.22.2-2
- Plug a memory leak
* Tue Mar 4 2008 Matthias Clasen <mclasen@redhat.com> - 2.22.2-1
- Update to 2.22.2

16
rsvg-better-free.patch Normal file
View File

@ -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