Free JERRY_CONTEXT (error_value) (#2071)

JerryScript-DCO-1.0-Signed-off-by: Marko Fabo mfabo@inf.u-szeged.hu
This commit is contained in:
Marko Fabo 2017-11-06 15:48:05 +01:00 committed by Dániel Bátyai
parent 3de6c7ec7a
commit bdcd2d8179
2 changed files with 16 additions and 0 deletions

View File

@ -146,6 +146,7 @@ vm_op_set_value (ecma_value_t object, /**< base object */
{
#ifdef JERRY_ENABLE_ERROR_MESSAGES
ecma_free_value (to_object);
ecma_free_value (JERRY_CONTEXT (error_value));
ecma_value_t error_value = ecma_raise_standard_error_with_format (ECMA_ERROR_TYPE,
"Cannot set property '%' of %",

View File

@ -0,0 +1,15 @@
// Copyright JS Foundation and other contributors, http://js.foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
null[1] = 'abcd';