From: Dmitry Stogov Date: Mon, 22 Aug 2005 06:56:26 +0000 (+0000) Subject: Fixed memory leak X-Git-Tag: PRE_NEW_OCI8_EXTENSION~132 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6fad26469c9b0f539c51514d9a125ec34fc67ad8;p=php Fixed memory leak --- 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);