Correct release of spread arguments (#3867)
During the `opfunc_spread_arguments` argument release process the stack pointer was incremented early resulting in a state where one of the arguments was not freed causing a memory leak. JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
This commit is contained in:
@@ -471,7 +471,7 @@ opfunc_spread_arguments (ecma_value_t *stack_top_p, /**< pointer to the current
|
||||
{
|
||||
for (uint32_t k = i + 1; k < arguments_list_len; k++)
|
||||
{
|
||||
ecma_free_value (*(++stack_top_p));
|
||||
ecma_free_value (*stack_top_p++);
|
||||
}
|
||||
|
||||
ecma_collection_free (buff_p);
|
||||
|
||||
Reference in New Issue
Block a user