[pygobject] PyGProps_getattro(): Fix GObjectClass leak
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] PyGProps_getattro(): Fix GObjectClass leak
- Date: Thu, 4 Oct 2012 07:43:36 +0000 (UTC)
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]