[pygobject] Fix some ref leaks in hook_up_vfunc_implementation()
- From: Steve Frécinaux <sfre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Fix some ref leaks in hook_up_vfunc_implementation()
- Date: Wed, 18 Aug 2010 18:15:46 +0000 (UTC)
commit ac59c18a4f2bfff47c862b763aaf1d1cf136a4f5
Author: Steve Frécinaux <code istique net>
Date: Tue Aug 17 14:49:30 2010 +0200
Fix some ref leaks in hook_up_vfunc_implementation()
https://bugzilla.gnome.org/show_bug.cgi?id=627143
gi/gimodule.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/gi/gimodule.c b/gi/gimodule.c
index 56ae7a3..757a494 100644
--- a/gi/gimodule.c
+++ b/gi/gimodule.c
@@ -195,12 +195,17 @@ _wrap_pyg_hook_up_vfunc_implementation (PyObject *self, PyObject *args)
field_info = g_struct_info_get_field (struct_info, i);
if (strcmp (g_base_info_get_name ( (GIBaseInfo*) field_info),
- g_base_info_get_name ( (GIBaseInfo*) vfunc_info)) != 0)
+ g_base_info_get_name ( (GIBaseInfo*) vfunc_info)) != 0) {
+ g_base_info_unref (field_info);
continue;
+ }
type_info = g_field_info_get_type (field_info);
- if (g_type_info_get_tag (type_info) != GI_TYPE_TAG_INTERFACE)
+ if (g_type_info_get_tag (type_info) != GI_TYPE_TAG_INTERFACE) {
+ g_base_info_unref (type_info);
+ g_base_info_unref (field_info);
continue;
+ }
interface_info = g_type_info_get_interface (type_info);
g_assert (g_base_info_get_type (interface_info) == GI_INFO_TYPE_CALLBACK);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]