diff options
Diffstat (limited to 'Zend/zend_exceptions.c')
-rw-r--r-- | Zend/zend_exceptions.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 7fd55a4fc8..5301850310 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -531,6 +531,7 @@ static void _build_trace_args(zval *arg, smart_str *str) /* {{{ */ smart_str_appends(str, "Object("); smart_str_appends(str, ZSTR_VAL(class_name)); smart_str_appends(str, "), "); + zend_string_release(class_name); break; } } @@ -1039,6 +1040,7 @@ ZEND_API ZEND_COLD void zend_throw_exception_object(zval *exception) /* {{{ */ if (!exception_ce || !instanceof_function(exception_ce, zend_ce_throwable)) { zend_throw_error(NULL, "Cannot throw objects that do not implement Throwable"); + zval_ptr_dtor(exception); return; } zend_throw_exception_internal(exception); |