]> granicus.if.org Git - php/commitdiff
moved destroying of garbage before resource-list gets destroyed - (see my previous...
authorThies C. Arntzen <thies@php.net>
Tue, 1 Feb 2000 11:41:15 +0000 (11:41 +0000)
committerThies C. Arntzen <thies@php.net>
Tue, 1 Feb 2000 11:41:15 +0000 (11:41 +0000)
zeev, andi - please comment!

Zend/zend_execute_API.c

index 62b4cee1f6dd203acaf34e74594b747832ce2290..a58cdf06cc522abb6fcd4a5e3b1f895d518c5499 100644 (file)
@@ -134,6 +134,12 @@ void shutdown_executor(ELS_D)
 
        zend_hash_destroy(&EG(symbol_table));
 
+       while (EG(garbage_ptr)--) {
+               if (EG(garbage)[EG(garbage_ptr)]->refcount==1) {
+                       zval_ptr_dtor(&EG(garbage)[EG(garbage_ptr)]);
+               }
+       }
+
        destroy_resource_list(ELS_C); /* must be destroyed after the main symbol table is destroyed */
 
        zend_ptr_stack_destroy(&EG(argument_stack));
@@ -145,11 +151,7 @@ void shutdown_executor(ELS_D)
 #if ZEND_DEBUG
        signal(SIGSEGV, original_sigsegv_handler);
 #endif
-       while (EG(garbage_ptr)--) {
-               if (EG(garbage)[EG(garbage_ptr)]->refcount==1) {
-                       zval_ptr_dtor(&EG(garbage)[EG(garbage_ptr)]);
-               }
-       }
+
 
        zend_hash_destroy(&EG(imported_files));
 }