diff options
| author | Nikita Popov <nikic@php.net> | 2016-07-13 23:35:53 +0200 |
|---|---|---|
| committer | Nikita Popov <nikic@php.net> | 2016-07-14 18:37:21 +0200 |
| commit | 5063b5aea16a512794e482a4a0b660b018f3f60b (patch) | |
| tree | 56ad0c21333ed81c945b4be0b92e3d1cd4d43390 /Zend/zend_exceptions.c | |
| parent | 5829458215597058c54189b951e0c923deaeaf9b (diff) | |
| download | php-git-5063b5aea16a512794e482a4a0b660b018f3f60b.tar.gz | |
Fix leak if throw_exception_object() fails
Diffstat (limited to 'Zend/zend_exceptions.c')
| -rw-r--r-- | Zend/zend_exceptions.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 374f3045b3..4d1b016cbb 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -1070,6 +1070,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); |
