apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r758619 - /apr/apr/trunk/memory/unix/apr_pools.c
Date Thu, 26 Mar 2009 13:06:09 GMT
Author: rpluem
Date: Thu Mar 26 13:06:05 2009
New Revision: 758619

URL: http://svn.apache.org/viewvc?rev=758619&view=rev
Log:
* Don't destroy our own pool mutex in apr_pool_clear.

Modified:
    apr/apr/trunk/memory/unix/apr_pools.c

Modified: apr/apr/trunk/memory/unix/apr_pools.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/memory/unix/apr_pools.c?rev=758619&r1=758618&r2=758619&view=diff
==============================================================================
--- apr/apr/trunk/memory/unix/apr_pools.c (original)
+++ apr/apr/trunk/memory/unix/apr_pools.c Thu Mar 26 13:06:05 2009
@@ -511,6 +511,8 @@
 #endif /* defined(NETWARE) */
     cleanup_t            *pre_cleanups;
     cleanup_t            *free_pre_cleanups;
+    cleanup_t            *final_cleanups;
+    block_list_t         *final_blocks;
 };
 
 #define SIZEOF_POOL_T       APR_ALIGN_DEFAULT(sizeof(apr_pool_t))
@@ -780,6 +782,8 @@
     }
 
     block_list_destroy_all(pool->blocks);
+    run_cleanups(&pool->final_cleanups);
+    block_list_destroy_all(pool->final_blocks);
     free(pool);
 }
 
@@ -817,6 +821,10 @@
     pool->blocks->next = NULL;
     (void)apr_thread_mutex_create(&pool->mutex,
                                   APR_THREAD_MUTEX_NESTED, pool);
+    pool->final_blocks = pool->blocks;
+    pool->final_cleanups = pool->cleanups;
+    pool->blocks = calloc(1, sizeof(block_list_t));
+    pool->cleanups = NULL;
     
     
 #ifdef NETWARE



Mime
View raw message