- MFH: Reset global pointer to NULL after mem free (required for apache 1.3)

This commit is contained in:
Marcus Boerger 2005-09-26 17:56:26 +00:00
parent c508b5e66a
commit 15c9f414a6

View File

@ -627,6 +627,7 @@ PHP_MINIT_FUNCTION(spl)
PHP_RINIT_FUNCTION(spl) /* {{{ */
{
SPL_G(autoload_extensions) = estrndup(".inc,.php", sizeof(".inc,.php")-1);
SPL_G(autoload_functions) = NULL;
return SUCCESS;
} /* }}} */
@ -639,6 +640,7 @@ PHP_RSHUTDOWN_FUNCTION(spl) /* {{{ */
if (SPL_G(autoload_functions)) {
zend_hash_destroy(SPL_G(autoload_functions));
FREE_HASHTABLE(SPL_G(autoload_functions));
SPL_G(autoload_functions) = NULL;
}
return SUCCESS;
} /* }}} */