- Add patch for RH bug #237179 (memory leak).

This commit is contained in:
Matthew Barnes 2007-04-20 01:39:25 +00:00
parent 6908fab366
commit ef7abcb5c0
2 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,21 @@
--- pygobject-2.12.3/gobject/pygflags.c.memory-leak 2007-04-19 21:29:49.000000000 -0400
+++ pygobject-2.12.3/gobject/pygflags.c 2007-04-19 21:30:33.000000000 -0400
@@ -176,7 +176,9 @@
retval = PyDict_GetItem(values, pyint);
Py_DECREF(pyint);
- if (!retval) {
+ if (retval) {
+ Py_INCREF(retval);
+ } else {
PyErr_Clear();
retval = ((PyTypeObject *)pyclass)->tp_alloc((PyTypeObject *)pyclass, 0);
@@ -186,7 +188,6 @@
((PyGFlags*)retval)->gtype = gtype;
}
- Py_INCREF(retval);
return retval;
}

View File

@ -4,7 +4,7 @@
Name: pygobject2
Version: 2.12.3
Release: 2%{?dist}
Release: 3%{?dist}
License: LGPL
Group: Development/Languages
Summary: Python bindings for GObject
@ -12,6 +12,10 @@ URL: http://www.pygtk.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Source: pygobject-%{version}.tar.bz2
### Patches ###
Patch1: pygobject-2.12.3-memory-leak.patch
### Dependencies ###
Requires: glib2 >= 2.8
@ -49,6 +53,7 @@ This package contains documentation files for pygobject2.
%prep
%setup -q -n pygobject-%{version}
%patch1 -p1 -b .memory-leak
%build
# --disable-docs doesn't work; it builds the docs anyway.
@ -92,6 +97,9 @@ rm -fr $RPM_BUILD_ROOT
%{_datadir}/pygobject/xsl
%changelog
* Thu Apr 19 2007 Matthew Barnes <mbarnes@redhat.com> - 2.12.3-3.fc7
- Add patch for RH bug #237179 (memory leak).
* Thu Dec 7 2006 Jeremy Katz <katzj@redhat.com> - 2.12.3-2
- rebuild against python 2.5