]> granicus.if.org Git - php/commitdiff
MFH: - Fix memleak in ZTS mode
authorfoobar <sniper@php.net>
Sun, 9 Jan 2005 16:12:23 +0000 (16:12 +0000)
committerfoobar <sniper@php.net>
Sun, 9 Jan 2005 16:12:23 +0000 (16:12 +0000)
main/main.c

index 2ab6aabd24cca576834da60f319331bf76c7c6b5..c70b8498216542b99e3d3ce8339b3f456befe7c6 100644 (file)
@@ -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;
 }