Browse Source

MFH: shutdown crypt correctly and fix memleak in ZTS mode

PECL
Antony Dovgal 18 years ago
parent
commit
881d80382b
  1. 2
      ext/standard/basic_functions.c
  2. 7
      ext/standard/crypt.c
  3. 2
      ext/standard/php_crypt.h

2
ext/standard/basic_functions.c

@ -4108,7 +4108,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
@ -4129,6 +4128,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;
}

7
ext/standard/crypt.c

@ -107,15 +107,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";

2
ext/standard/php_crypt.h

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

Loading…
Cancel
Save