Add missing value release to TypedArray fill method (#4177)

Value was not freed when error occurs. It caused assertion to fail
when BigInt was used.

JerryScript-DCO-1.0-Signed-off-by: Rafal Walczyna r.walczyna@samsung.com
This commit is contained in:
Rafal Walczyna
2020-09-01 15:28:12 +02:00
committed by GitHub
parent ed63665901
commit 074945dafa
2 changed files with 23 additions and 0 deletions
@@ -1294,6 +1294,7 @@ ecma_builtin_typedarray_prototype_fill (ecma_value_t this_arg, /**< this argumen
info.length,
&begin_index_uint32)))
{
ecma_free_value (value_to_set);
return ECMA_VALUE_ERROR;
}
@@ -1307,6 +1308,7 @@ ecma_builtin_typedarray_prototype_fill (ecma_value_t this_arg, /**< this argumen
info.length,
&end_index_uint32)))
{
ecma_free_value (value_to_set);
return ECMA_VALUE_ERROR;
}
}