[pygobject] PyGProps_getattro(): Fix GObjectClass leak



commit 4c9318d97aa34051a0460e8db2ed0f963126b7f5
Author: Johan Dahlin <johan gnome org>
Date:   Thu Oct 4 09:42:41 2012 +0200

    PyGProps_getattro(): Fix GObjectClass leak
    
    https://bugzilla.gnome.org/show_bug.cgi?id=685218

 gi/_gobject/pygobject.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gi/_gobject/pygobject.c b/gi/_gobject/pygobject.c
index e6bb2c9..153a3c7 100644
--- a/gi/_gobject/pygobject.c
+++ b/gi/_gobject/pygobject.c
@@ -252,7 +252,9 @@ PyGProps_getattro(PyGProps *self, PyObject *attr)
     class = g_type_class_ref(self->gtype);
     
     if (!strcmp(attr_name, "__members__")) {
-	return build_parameter_list(class);
+        ret = build_parameter_list(class);
+        g_type_class_unref(class);
+	return ret;
     }
 
     if (self->pygobject != NULL) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]