[pygobject] Release allocated array of arguments when handling closures
- From: Tomeu Vizoso <tomeuv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Release allocated array of arguments when handling closures
- Date: Fri, 7 Jan 2011 09:06:57 +0000 (UTC)
commit 6cf298ca5565d0eb99824f050ff47407e50a5c01
Author: Mike Gorse <mgorse novell com>
Date: Fri Jan 7 09:08:31 2011 +0100
Release allocated array of arguments when handling closures
https://bugzilla.gnome.org/show_bug.cgi?id=638847
gi/pygi-closure.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gi/pygi-closure.c b/gi/pygi-closure.c
index 0425c99..33a8d81 100644
--- a/gi/pygi-closure.c
+++ b/gi/pygi-closure.c
@@ -245,6 +245,7 @@ _pygi_closure_convert_arguments (GICallableInfo *callable_info, void **args,
if (_PyTuple_Resize (py_args, n_in_args) == -1)
goto error;
+ g_free (g_args);
return TRUE;
error:
@@ -355,6 +356,8 @@ _pygi_closure_handle (ffi_cif *cif,
_pygi_closure_set_out_arguments (closure->info, retval, out_args, result);
end:
+ if (out_args != NULL)
+ g_free (out_args);
g_base_info_unref ( (GIBaseInfo*) return_type);
PyGILState_Release (state);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]