Correctly free descriptors in Object.assign (#4069)

The property descriptors must be free'd during the iteration in the
Object.assign even if the property is not enumerable (or there is no value/getter).

Fixes: #4048

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
This commit is contained in:
Péter Gál
2020-07-27 19:47:55 +02:00
committed by GitHub
parent 9a026f54ac
commit 435c9cadcf
2 changed files with 71 additions and 1 deletions
@@ -1116,8 +1116,9 @@ ecma_builtin_object_object_assign (ecma_object_t *target_p, /**< target object *
}
ecma_free_value (prop_value);
ecma_free_property_descriptor (&prop_desc);
}
ecma_free_property_descriptor (&prop_desc);
}
ecma_deref_object (from_obj_p);