From: Antony Dovgal Date: Tue, 20 Dec 2005 11:25:34 +0000 (+0000) Subject: fix leak appearing when __autoload() throws an exception X-Git-Tag: php-5.1.2RC1~40 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9255733c4fa523e390d0973d3d342fd8a76d564a;p=php fix leak appearing when __autoload() throws an exception --- diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 4618d7b85e..7624643412 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -947,7 +947,7 @@ ZEND_API int zend_lookup_class_ex(char *name, int name_length, int use_autoload, zval **args[1]; zval autoload_function; zval *class_name_ptr; - zval *retval_ptr; + zval *retval_ptr = NULL; int retval; char *lc_name; zval *exception; @@ -1030,6 +1030,8 @@ ZEND_API int zend_lookup_class_ex(char *name, int name_length, int use_autoload, } if (!EG(exception)) { EG(exception) = exception; + } + if (retval_ptr) { zval_ptr_dtor(&retval_ptr); }