[pygobject] Plug a small memory leak.
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Plug a small memory leak.
- Date: Sun, 16 Jan 2011 21:09:26 +0000 (UTC)
commit a4950b4cbb3c7567a8586061bb361adb7d9afb98
Author: Paolo Borelli <pborelli gnome org>
Date: Sun Jan 16 21:43:30 2011 +0100
Plug a small memory leak.
Do not leak type_info in find_vfunc_info
gi/gimodule.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gi/gimodule.c b/gi/gimodule.c
index acbd6df..3ab08d0 100644
--- a/gi/gimodule.c
+++ b/gi/gimodule.c
@@ -188,14 +188,14 @@ find_vfunc_info (GIBaseInfo *vfunc_info,
}
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;
+ *field_info_ret = field_info;
+ break;
}
- *field_info_ret = field_info;
- break;
+ g_base_info_unref (type_info);
+ g_base_info_unref (field_info);
}
g_base_info_unref (struct_info);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]