[gjs] fix mem leak in gjs_value_to_g_argument()



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

    fix mem leak in gjs_value_to_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 06618e0..97230b2 100644
--- a/gi/arg.c
+++ b/gi/arg.c
@@ -1307,9 +1307,12 @@ gjs_value_to_g_argument(JSContext      *context,
             switch(interface_type) {
             case GI_INFO_TYPE_STRUCT:
                 if (g_struct_info_is_foreign((GIStructInfo*)interface_info)) {
-                    return gjs_struct_foreign_convert_to_g_argument(
+                    JSBool ret;
+                    ret = gjs_struct_foreign_convert_to_g_argument(
                             context, value, interface_info, arg_name,
                             arg_type, transfer, may_be_null, arg);
+                    g_base_info_unref(interface_info);
+                    return ret;
                 }
                 /* fall through */
             case GI_INFO_TYPE_ENUM:



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