/* Check for arrays */
if (jsvalue_instanceof(context, jsvalue, "Array"))
{
- JSPropertyNameArrayRef propnames;
char *array_signature;
propnames = JSObjectCopyPropertyNames(context, (JSObjectRef)jsvalue);
if (!jsarray_get_signature(context, jsvalue, propnames, &array_signature))
{
g_warning("Could not create array signature");
+ JSPropertyNameArrayRelease(propnames);
break;
}
signature = g_strdup_printf("a%s", array_signature);
g_free(array_signature);
+ JSPropertyNameArrayRelease(propnames);
break;
}
/* Check structs */
if (jsvalue_typeof(context, jsvalue, "DBusStruct"))
{
- JSPropertyNameArrayRef propnames;
JSObjectRef value = (JSObjectRef)JSObjectGetPrivate((JSObjectRef)jsvalue);
propnames = JSObjectCopyPropertyNames(context, value);
jsstruct_get_signature(context, value, propnames, &signature);
+ JSPropertyNameArrayRelease(propnames);
break;
}
signature = g_strdup_printf("a%s", dict_signature);
g_free(dict_signature);
}
-
+ JSPropertyNameArrayRelease(propnames);
break;
}
case kJSTypeUndefined: