mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Fixed memory leaks
This commit is contained in:
parent
db30e0ce16
commit
d206630f13
@ -3782,6 +3782,7 @@ PHP_MSHUTDOWN_FUNCTION(basic) /* {{{ */
|
||||
#endif
|
||||
BASIC_MSHUTDOWN_SUBMODULE(crypt)
|
||||
BASIC_MSHUTDOWN_SUBMODULE(random)
|
||||
BASIC_MSHUTDOWN_SUBMODULE(password)
|
||||
|
||||
zend_hash_destroy(&basic_submodules);
|
||||
return SUCCESS;
|
||||
|
@ -523,6 +523,17 @@ PHP_MINIT_FUNCTION(password) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
PHP_MSHUTDOWN_FUNCTION(password) /* {{{ */
|
||||
{
|
||||
#ifdef ZTS
|
||||
if (!tsrm_is_main_thread()) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
zend_hash_destroy(&php_password_algos);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
const php_password_algo* php_password_algo_default() {
|
||||
return &php_password_algo_bcrypt;
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ PHP_FUNCTION(password_get_info);
|
||||
PHP_FUNCTION(password_algos);
|
||||
|
||||
PHP_MINIT_FUNCTION(password);
|
||||
PHP_MSHUTDOWN_FUNCTION(password);
|
||||
|
||||
#define PHP_PASSWORD_DEFAULT PHP_PASSWORD_BCRYPT
|
||||
#define PHP_PASSWORD_BCRYPT_COST 10
|
||||
|
Loading…
Reference in New Issue
Block a user