From 541d8e10bb03d48c6f1d35f16d33265944870e77 Mon Sep 17 00:00:00 2001 From: foobar Date: Sun, 9 Jan 2005 16:12:23 +0000 Subject: [PATCH] MFH: - Fix memleak in ZTS mode --- main/main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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; } -- 2.50.1