- Reset global pointer to NULL after mem free (required for apache 1.3)
authorMarcus Boerger <helly@php.net>
Mon, 26 Sep 2005 17:54:57 +0000 (17:54 +0000)
committerMarcus Boerger <helly@php.net>
Mon, 26 Sep 2005 17:54:57 +0000 (17:54 +0000)
ext/spl/php_spl.c

index b64b17e2864a46c9fbaa3466063ab2a7d9264ee3..3e5561b1a4456a534286702ee3736a7358405855 100755 (executable)
@@ -631,6 +631,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;
 } /* }}} */
 
@@ -643,6 +644,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;
 } /* }}} */