[gjs] fix mem leak in gjs_value_from_g_argument()



commit e042120809626f1731ae3ea06032e0fb19ae6579
Author: Pavel Vasin <rat4vier gmail com>
Date:   Fri Jun 29 14:53:20 2012 +0400

    fix mem leak in gjs_value_from_g_argument()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=679138

 gi/arg.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gi/arg.c b/gi/arg.c
index 97230b2..25f1808 100644
--- a/gi/arg.c
+++ b/gi/arg.c
@@ -2460,7 +2460,10 @@ gjs_value_from_g_argument (JSContext  *context,
                 goto out;
             } else if (interface_type == GI_INFO_TYPE_STRUCT &&
                        g_struct_info_is_foreign((GIStructInfo*)interface_info)) {
-                return gjs_struct_foreign_convert_from_g_argument(context, value_p, interface_info, arg);
+                JSBool ret;
+                ret = gjs_struct_foreign_convert_from_g_argument(context, value_p, interface_info, arg);
+                g_base_info_unref(interface_info);
+                return ret;
             }
 
             /* Everything else is a pointer type, NULL is the easy case */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]