diff options
author | rpluem <rpluem@13f79535-47bb-0310-9956-ffa450edef68> | 2009-03-26 13:06:05 +0000 |
---|---|---|
committer | rpluem <rpluem@13f79535-47bb-0310-9956-ffa450edef68> | 2009-03-26 13:06:05 +0000 |
commit | 37baeb5a499c93334b8b59411d3b478937af56c8 (patch) | |
tree | c161bc4720e3597936887a29d4586a43bd5ed12d /memory | |
parent | 68b1e426f871cd58a622be670da876aa44ebb45c (diff) | |
download | libapr-37baeb5a499c93334b8b59411d3b478937af56c8.tar.gz |
* Don't destroy our own pool mutex in apr_pool_clear.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@758619 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'memory')
-rw-r--r-- | memory/unix/apr_pools.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/memory/unix/apr_pools.c b/memory/unix/apr_pools.c index b9845f627..1f99421f0 100644 --- a/memory/unix/apr_pools.c +++ b/memory/unix/apr_pools.c @@ -511,6 +511,8 @@ struct apr_pool_t { #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 @@ APR_DECLARE(void) apr_pool_destroy(apr_pool_t *pool) } block_list_destroy_all(pool->blocks); + run_cleanups(&pool->final_cleanups); + block_list_destroy_all(pool->final_blocks); free(pool); } @@ -817,6 +821,10 @@ APR_DECLARE(apr_status_t) apr_pool_create_ex(apr_pool_t **newpool, 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 |