summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Vasin <rat4vier@gmail.com>2012-06-29 14:53:03 +0400
committerJasper St. Pierre <jstpierre@mecheye.net>2012-06-29 10:35:22 -0400
commita5be0cdc4484aa84080d9f15df57178810eef970 (patch)
tree6e6099f3c403be5e6a18a3afd8fbf094eb2a6e3a
parenta6ebdb5ebad1742948c5ce608b190c9654d901a5 (diff)
downloadgjs-a5be0cdc4484aa84080d9f15df57178810eef970.tar.gz
fix mem leak in gjs_value_to_g_argument()
https://bugzilla.gnome.org/show_bug.cgi?id=679138
-rw-r--r--gi/arg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gi/arg.c b/gi/arg.c
index 06618e0d..97230b2f 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: