Hi,

have found a double free and I'm not sure what is the proper fix.

To reproduce, instantiate a boxed: python -c "from gi.repository
import Pango; Pango.FontDescription()"

This "fixes" it, but may not be the right thing to do:

diff --git a/gi/pygi-info.c b/gi/pygi-info.c
index 6f16bb6..d5f8105 100644
--- a/gi/pygi-info.c
+++ b/gi/pygi-info.c
@@ -960,6 +958,7 @@ _wrap_g_function_info_invoke (PyGIBaseInfo *self,
                     }
                     g_warn_if_fail(transfer == GI_TRANSFER_EVERYTHING);
                     return_value = pyg_boxed_new(type,
return_arg.v_pointer, FALSE, transfer == GI_TRANSFER_E
+                    Py_INCREF(return_value);
                 } else if (g_type_is_a(type, G_TYPE_POINTER) || type
== G_TYPE_NONE) {
                     if (return_arg.v_pointer == NULL) {
                         PyErr_SetString(PyExc_TypeError, "constructor
returned NULL");

Any ideas?

Thanks,

Tomeu

-- 
«Sugar Labs is anyone who participates in improving and using Sugar.
What Sugar Labs does is determined by the participants.» - David
Farning
_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to