Bug#668709: [Patch] memory leak in _wrap_pango_cairo_create_layout
YunQiang Su
wzssyqa at gmail.com
Mon Nov 4 17:11:03 UTC 2013
On Sat, Apr 14, 2012 at 1:49 PM, YunQiang Su <wzssyqa at gmail.com> wrote:
> Package: pygtk
> Version: 2.24
>
> if didn't unref after pygobject_new.
>
> while(1):
> a=pango_cairo.create_layout()
>
> may cause, memory run out: python doesn't GC this memory.
>
> The patch is:
>
> 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 *
>
> This patch is given by "王勇"<wangyong at linuxdeepin.com>
Hi, I noticed that you have fixed this problem. Can you also upload
the fix to Debian?
>
> --
> YunQiang Su
>
>
>
>
> _______________________________________________
> pkg-gnome-maintainers mailing list
> pkg-gnome-maintainers at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-gnome-maintainers
--
YunQiang Su
More information about the pkg-gnome-maintainers
mailing list