Correctly release values in Proxy.[[Get]] (#4477)

In Proxy.[[Get]] if the target.[[GetOwnPropertyDescriptor]] fails the
trap result should be freed.

Fixes: #4466

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
This commit is contained in:
Péter Gál
2021-01-15 20:48:13 +01:00
committed by GitHub
parent 9ce7e49073
commit b0ca537a34
2 changed files with 36 additions and 0 deletions
@@ -1158,6 +1158,7 @@ ecma_proxy_object_get (ecma_object_t *obj_p, /**< proxy object */
/* 12. */
if (ECMA_IS_VALUE_ERROR (status))
{
ecma_free_value (trap_result);
return status;
}