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 [email protected]
This commit is contained in:
1 parent
cae6cd08fb
commit
ba4e3a402f
2 files changed
+54
-1
No files matched your search
@@ -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