Destroy the resource list after destroying the symbol table, otherwise the

auto-destructor for resources are run when the resource list is no longer valid
This commit is contained in:
Zeev Suraski 1999-04-12 18:40:18 +00:00
parent 39a7f4c306
commit 15be5f0b4a
2 changed files with 2 additions and 1 deletions

View File

@ -78,7 +78,6 @@ void shutdown_compiler(CLS_D)
zend_llist_destroy(&CG(filenames_list));
zend_hash_apply(CG(function_table), (int (*)(void *)) is_not_internal_function);
zend_hash_apply(CG(class_table), (int (*)(void *)) is_not_internal_class);
destroy_resource_list();
zend_hash_apply(&module_registry, (int (*)(void *)) module_registry_cleanup);
}

View File

@ -126,6 +126,8 @@ void shutdown_executor(ELS_D)
zend_hash_destroy(&EG(symbol_table));
destroy_resource_list(); /* must be destroyed after the main symbol table is destroyed */
zend_ptr_stack_destroy(&EG(argument_stack));
if (EG(main_op_array)) {
destroy_op_array(EG(main_op_array));