shudown crypt correctly and fix memleak in ZTS mode

This commit is contained in:
Antony Dovgal 2008-08-19 15:14:15 +00:00
parent bc9540c564
commit 9bb1694aa4
3 changed files with 6 additions and 4 deletions

View File

@ -4105,7 +4105,6 @@ PHP_MSHUTDOWN_FUNCTION(basic) /* {{{ */
basic_globals_dtor(&basic_globals TSRMLS_CC);
#ifdef PHP_WIN32
php_win32_core_globals_dtor(&the_php_win32_core_globals TSRMLS_CC);
PHP_MSHUTDOWN(crypt);
#endif
#endif
@ -4126,6 +4125,7 @@ PHP_MSHUTDOWN_FUNCTION(basic) /* {{{ */
#if defined(HAVE_LOCALECONV) && defined(ZTS)
PHP_MSHUTDOWN(localeconv)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
#endif
PHP_MSHUTDOWN(crypt)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
return SUCCESS;
}

View File

@ -108,15 +108,16 @@ PHP_MINIT_FUNCTION(crypt) /* {{{ */
return SUCCESS;
}
/* }}} */
#ifdef PHP_USE_PHP_CRYPT_R
PHP_MSHUTDOWN_FUNCTION(crypt)
PHP_MSHUTDOWN_FUNCTION(crypt) /* {{{ */
{
#ifdef PHP_USE_PHP_CRYPT_R
php_shutdown_crypt_r();
#endif
return SUCCESS;
}
#endif
/* }}} */
static unsigned char itoa64[] = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";

View File

@ -26,6 +26,7 @@
PHP_FUNCTION(crypt);
#if HAVE_CRYPT
PHP_MINIT_FUNCTION(crypt);
PHP_MSHUTDOWN_FUNCTION(crypt);
PHP_RINIT_FUNCTION(crypt);
#endif