diff options
author | Dmitry Stogov <dmitry@zend.com> | 2018-07-05 11:54:26 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2018-07-05 11:54:26 +0300 |
commit | b6cc4d2009a7df108c2858f28750d01e55c6de24 (patch) | |
tree | 2a5f9120e946fd932cf3f98104200a45feeeaa8a /ext/reflection/php_reflection.c | |
parent | 265c3ed6cfd05b78fb65187f18b3e1ecb560c242 (diff) | |
download | php-git-b6cc4d2009a7df108c2858f28750d01e55c6de24.tar.gz |
Use zval_ptr_dtor() instead of zval_dtor() in internal functions that destroy new created object (This is safer and produces less code)
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r-- | ext/reflection/php_reflection.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index a793536d8d..e57c388e4a 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -4672,12 +4672,12 @@ ZEND_METHOD(reflection_class, newInstance) if (!(constructor->common.fn_flags & ZEND_ACC_PUBLIC)) { zend_throw_exception_ex(reflection_exception_ptr, 0, "Access to non-public constructor of class %s", ZSTR_VAL(ce->name)); - zval_dtor(return_value); + zval_ptr_dtor(return_value); RETURN_NULL(); } if (zend_parse_parameters(ZEND_NUM_ARGS(), "*", ¶ms, &num_args) == FAILURE) { - zval_dtor(return_value); + zval_ptr_dtor(return_value); RETURN_FALSE; } @@ -4704,7 +4704,7 @@ ZEND_METHOD(reflection_class, newInstance) } if (ret == FAILURE) { php_error_docref(NULL, E_WARNING, "Invocation of %s's constructor failed", ZSTR_VAL(ce->name)); - zval_dtor(return_value); + zval_ptr_dtor(return_value); RETURN_NULL(); } } else if (ZEND_NUM_ARGS()) { @@ -4769,7 +4769,7 @@ ZEND_METHOD(reflection_class, newInstanceArgs) if (!(constructor->common.fn_flags & ZEND_ACC_PUBLIC)) { zend_throw_exception_ex(reflection_exception_ptr, 0, "Access to non-public constructor of class %s", ZSTR_VAL(ce->name)); - zval_dtor(return_value); + zval_ptr_dtor(return_value); RETURN_NULL(); } @@ -4805,7 +4805,7 @@ ZEND_METHOD(reflection_class, newInstanceArgs) if (ret == FAILURE) { zval_ptr_dtor(&retval); php_error_docref(NULL, E_WARNING, "Invocation of %s's constructor failed", ZSTR_VAL(ce->name)); - zval_dtor(return_value); + zval_ptr_dtor(return_value); RETURN_NULL(); } } else if (argc) { |