Add missing release value call to %TypedArray%.prototype.findIndex routine (#2958)

This patch fixes #2947

Co-authored-by: Gabor Loki loki@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2019-07-11 11:31:04 +02:00
committed by Dániel Bátyai
parent 1374d5f562
commit 788fdc6603
2 changed files with 22 additions and 1 deletions
@@ -1550,7 +1550,13 @@ ecma_builtin_typedarray_prototype_find_helper (ecma_value_t this_arg, /**< this
if (call_result)
{
return is_find ? element_value : ecma_make_uint32_value (buffer_index);
if (is_find)
{
return element_value;
}
ecma_free_value (element_value);
return ecma_make_uint32_value (buffer_index);
}
buffer_index++;
ecma_free_value (element_value);