Correctly release wrapper object in JSON stringify (#4361)
When an error occurs accessing a property during JSON stringify call the wrapper object is not freed at the correct place. JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
This commit is contained in:
@@ -1268,6 +1268,7 @@ ecma_builtin_json_serialize_property (ecma_json_stringify_context_t *context_p,
|
||||
|
||||
if (ECMA_IS_VALUE_ERROR (to_json))
|
||||
{
|
||||
ecma_free_value (value);
|
||||
return to_json;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user