From 64bfa552ad88f16764c2c8d484b934a864ab00ce Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Wed, 30 Dec 2015 15:54:47 +0100 Subject: [PATCH] Fix double free Fix double free of `php_value` and free `php_ret_value` instead (which otherwise leaks). --- v8js_object_export.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v8js_object_export.cc b/v8js_object_export.cc index 92abaea..28111cb 100644 --- a/v8js_object_export.cc +++ b/v8js_object_export.cc @@ -675,7 +675,7 @@ v8::Local v8js_named_property_callback(v8::Local property zval php_ret_value; zend_call_method_with_2_params(&zobject, ce, &ce->__set, ZEND_SET_FUNC_NAME, &php_ret_value, &zname, &php_value); ret_value = zval_to_v8js(&php_ret_value, isolate TSRMLS_CC); - zval_ptr_dtor(&php_value); + zval_ptr_dtor(&php_ret_value); } }