From: foobar Date: Sun, 9 Jan 2005 16:12:23 +0000 (+0000) Subject: MFH: - Fix memleak in ZTS mode X-Git-Tag: php-4.3.11RC1~187 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=541d8e10bb03d48c6f1d35f16d33265944870e77;p=php MFH: - Fix memleak in ZTS mode --- diff --git a/main/main.c b/main/main.c index 2ab6aabd24..c70b849821 100644 --- a/main/main.c +++ b/main/main.c @@ -1297,6 +1297,8 @@ void php_module_shutdown(TSRMLS_D) #ifndef ZTS zend_ini_shutdown(TSRMLS_C); shutdown_memory_manager(CG(unclean_shutdown), 1 TSRMLS_CC); +#else + zend_ini_global_shutdown(TSRMLS_C); #endif module_initialized = 0; @@ -1777,8 +1779,7 @@ PHPAPI int php_handle_auth_data(const char *auth TSRMLS_DC) { int ret = -1; - if (auth && auth[0] != '\0' - && strncmp(auth, "Basic ", 6) == 0) { + if (auth && auth[0] != '\0' && strncmp(auth, "Basic ", 6) == 0) { char *pass; char *user; @@ -1796,8 +1797,9 @@ PHPAPI int php_handle_auth_data(const char *auth TSRMLS_DC) } } - if (ret == -1) + if (ret == -1) { SG(request_info).auth_user = SG(request_info).auth_password = NULL; + } return ret; }