Properly release property name collection in for-in opcode handler (#2875)

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
This commit is contained in:
Dániel Bátyai
2019-05-16 15:34:41 +02:00
committed by GitHub
parent fd3e982e69
commit 9a512c8fcf
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -252,7 +252,9 @@ opfunc_for_in (ecma_value_t left_value, /**< left value */
*result_obj_p = ecma_make_object_value (obj_p);
}
jmem_heap_free_block (prop_names_coll_p, sizeof (ecma_collection_header_t));
/* Note: We release the collection header here, and return the chunk list of the collection, which will
* be handled and released by the vm loop. */
jmem_pools_free (prop_names_coll_p, sizeof (ecma_collection_header_t));
ecma_free_value (obj_expr_value);
return prop_names_p;