summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2005-08-22 06:56:26 +0000
committerDmitry Stogov <dmitry@php.net>2005-08-22 06:56:26 +0000
commit6fad26469c9b0f539c51514d9a125ec34fc67ad8 (patch)
tree8e406f09f0e6e666e4ee2f23d0e5d46362f955e6 /Zend/zend_execute_API.c
parent65ece9ef3e4a01c67d72958aef1eddf8373c4583 (diff)
downloadphp-git-6fad26469c9b0f539c51514d9a125ec34fc67ad8.tar.gz
Fixed memory leak
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r--Zend/zend_execute_API.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 731abce2f6..2de3928f17 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -1006,7 +1006,7 @@ ZEND_API int zend_u_lookup_class(zend_uchar type, void *name, int name_length, z
return FAILURE;
}
- ZVAL_STRINGL(&autoload_function, ZEND_AUTOLOAD_FUNC_NAME, sizeof(ZEND_AUTOLOAD_FUNC_NAME)-1, 0);
+ ZVAL_STRINGL(&autoload_function, ZEND_AUTOLOAD_FUNC_NAME, sizeof(ZEND_AUTOLOAD_FUNC_NAME)-1, 0);
ALLOC_ZVAL(class_name_ptr);
INIT_PZVAL(class_name_ptr);
@@ -1038,6 +1038,10 @@ ZEND_API int zend_u_lookup_class(zend_uchar type, void *name, int name_length, z
retval = zend_call_function(&fcall_info, &fcall_cache TSRMLS_CC);
EG(autoload_func) = fcall_cache.function_handler;
+ if (UG(unicode)) {
+ zval_dtor(&autoload_function);
+ }
+
zval_ptr_dtor(&class_name_ptr);
zend_u_hash_del(EG(in_autoload), type, lc_name, lc_name_len+1);