summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2005-12-20 11:25:39 +0000
committerAntony Dovgal <tony2001@php.net>2005-12-20 11:25:39 +0000
commit3ba24546ed77bcfda2ee877f6cf1e2e3d51fea70 (patch)
tree437adf2e332b7a5ce68f34de5e4f6d2d09752f80 /Zend/zend_execute_API.c
parent8f5f3d8408405fdd601bbb264895a845a250fa8d (diff)
downloadphp-git-3ba24546ed77bcfda2ee877f6cf1e2e3d51fea70.tar.gz
MFB: fix leak appearing when __autoload() throws an exception
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r--Zend/zend_execute_API.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 028ba9e5ea..5b369f7efd 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -970,7 +970,7 @@ ZEND_API int zend_u_lookup_class_ex(zend_uchar type, void *name, int name_length
zval **args[1];
zval autoload_function;
zval *class_name_ptr;
- zval *retval_ptr;
+ zval *retval_ptr = NULL;
int retval;
unsigned int lc_name_len;
char *lc_name;
@@ -1057,6 +1057,8 @@ ZEND_API int zend_u_lookup_class_ex(zend_uchar type, void *name, int name_length
}
if (!EG(exception)) {
EG(exception) = exception;
+ }
+ if (retval_ptr) {
zval_ptr_dtor(&retval_ptr);
}