diff options
author | Antony Dovgal <tony2001@php.net> | 2005-12-20 11:25:34 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2005-12-20 11:25:34 +0000 |
commit | 9255733c4fa523e390d0973d3d342fd8a76d564a (patch) | |
tree | 38825d99b1101a299dc254eb6c5acb53eb128ac4 /Zend/zend_execute_API.c | |
parent | 84326a9b72fe57e672d73cae7623026192456fb7 (diff) | |
download | php-git-9255733c4fa523e390d0973d3d342fd8a76d564a.tar.gz |
fix leak appearing when __autoload() throws an exception
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r-- | Zend/zend_execute_API.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); } |