com php-src: Fix leak if throw_exception_object() fai ls: Zend/zend_exceptions.c

From: Date: Thu, 14 Jul 2016 16:37:21 +0000
Subject: com php-src: Fix leak if throw_exception_object() fai ls: Zend/zend_exceptions.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-93024@lists.php.net to get a copy of this message
Commit: 5063b5aea16a512794e482a4a0b660b018f3f60b Author: Nikita Popov <nikic@php.net> Wed, 13 Jul 2016 23:35:53 +0200 Parents: 5829458215597058c54189b951e0c923deaeaf9b Branches: PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5063b5aea16a512794e482a4a0b660b018f3f60b Log: Fix leak if throw_exception_object() fails Changed paths: M Zend/zend_exceptions.c Diff: diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 374f304..4d1b016 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);

« previous php.cvs (#93024) next »