Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 450246

Summary: dev-python/pygtk-2.24.0 - memory leak in _wrap_pango_cairo_create_layout
Product: Gentoo Linux Reporter: Aten Zhang <atenzd>
Component: [OLD] LibraryAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED FIXED    
Severity: normal CC: python
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugzilla.gnome.org/show_bug.cgi?id=674092
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch to fix this

Description Aten Zhang 2013-01-04 14:49:33 UTC
Created attachment 334424 [details, diff]
patch to fix this

memory leak in _wrap_pango_cairo_create_layout
see https://bugzilla.gnome.org/show_bug.cgi?id=674092
Comment 1 Aten Zhang 2013-01-04 14:51:09 UTC
Comment on attachment 334424 [details, diff]
patch to fix this

>Index: pygtk-2.24.0/pangocairo.override
>===================================================================
>--- pygtk-2.24.0.orig/pangocairo.override	2012-04-14 01:40:59.568703232 +0800
>+++ pygtk-2.24.0/pangocairo.override	2012-04-14 01:41:05.792703324 +0800
>@@ -119,10 +119,15 @@
> _wrap_pango_cairo_create_layout(PyGObject *self)
> {
>     PangoLayout *ret;
>+    PyObject *py_ret;
> 
>     ret = pango_cairo_create_layout(PycairoContext_GET(self));
>     /* pygobject_new handles NULL checking */
>-    return pygobject_new((GObject *)ret);
>+    py_ret = pygobject_new((GObject *) ret);
>+    if (ret) {
>+	g_object_unref(ret);
>+    }
>+    return py_ret;
> }
> 
> static PyObject *
Comment 2 Pacho Ramos gentoo-dev 2013-09-29 10:21:48 UTC
+*pygtk-2.24.0-r4 (29 Sep 2013)
+
+  29 Sep 2013; Pacho Ramos <pacho@gentoo.org>
+  +files/pygtk-2.24.0-fix-leaks.patch, +files/pygtk-2.24.0-test-fail.patch,
+  +pygtk-2.24.0-r4.ebuild:
+  Upstream patch for fixing leaks, make tests exit with right result
+