[pygobject] Fix memory leak in _pygi_argument_to_array()
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Fix memory leak in _pygi_argument_to_array()
- Date: Thu, 4 Oct 2012 07:03:18 +0000 (UTC)
commit 43d356d03d4c83e9de3c56f98a70d387b46f17af
Author: Alban Browaeys <prahal yahoo com>
Date: Sat Sep 29 01:17:14 2012 +0200
Fix memory leak in _pygi_argument_to_array()
Length arg and type info need to be unref'ed.
https://bugzilla.gnome.org/show_bug.cgi?id=685082
gi/pygi-argument.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gi/pygi-argument.c b/gi/pygi-argument.c
index ee53469..db79574 100644
--- a/gi/pygi-argument.c
+++ b/gi/pygi-argument.c
@@ -810,11 +810,14 @@ _pygi_argument_to_array (GIArgument *arg,
g_assert (callable_info);
length_arg_info = g_callable_info_get_arg (callable_info, length_arg_pos);
length_type_info = g_arg_info_get_type (length_arg_info);
+ g_base_info_unref ( (GIBaseInfo *) length_arg_info);
if (!gi_argument_to_gssize (args[length_arg_pos],
g_type_info_get_tag (length_type_info),
&length)) {
+ g_base_info_unref ( (GIBaseInfo *) length_type_info);
return NULL;
}
+ g_base_info_unref ( (GIBaseInfo *) length_type_info);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]