[perl-Glib-Object-Introspection] Fix two small leaks
- From: Torsten SchÃnfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Glib-Object-Introspection] Fix two small leaks
- Date: Sat, 7 Jul 2012 20:07:39 +0000 (UTC)
commit ab95c1197f4061ce7c0cd99475fc1d8c84450948
Author: Torsten SchÃnfeld <kaffeetisch gmx de>
Date: Tue Jul 3 23:33:32 2012 +0200
Fix two small leaks
gperl-i11n-marshal-interface.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gperl-i11n-marshal-interface.c b/gperl-i11n-marshal-interface.c
index 3dc4bb8..d9634a7 100644
--- a/gperl-i11n-marshal-interface.c
+++ b/gperl-i11n-marshal-interface.c
@@ -72,7 +72,7 @@ sv_to_interface (GIArgInfo * arg_info,
case GI_INFO_TYPE_OBJECT:
case GI_INFO_TYPE_INTERFACE:
arg->v_pointer = gperl_get_object (sv);
- if (arg->v_pointer && transfer == GI_TRANSFER_EVERYTHING) {
+ if (arg->v_pointer && transfer >= GI_TRANSFER_CONTAINER) {
g_object_ref (arg->v_pointer);
if (G_IS_INITIALLY_UNOWNED (arg->v_pointer)) {
g_object_force_floating (arg->v_pointer);
@@ -211,7 +211,8 @@ interface_to_sv (GITypeInfo* info, GIArgument *arg, gboolean own, GPerlI11nInvoc
} else if (type == G_TYPE_VALUE) {
dwarn (" value type\n");
sv = gperl_sv_from_value (arg->v_pointer);
- /* FIXME: Check 'own'. */
+ if (own)
+ g_boxed_free (type, arg->v_pointer);
} else {
dwarn (" boxed type: %d (%s)\n",
type, g_type_name (type));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]