diff options
author | Ruediger Pluem <rpluem@apache.org> | 2009-03-26 13:06:05 +0000 |
---|---|---|
committer | Ruediger Pluem <rpluem@apache.org> | 2009-03-26 13:06:05 +0000 |
commit | 9574eee23c9edcd7a991ef3d5e77e4ff90d9937c (patch) | |
tree | c161bc4720e3597936887a29d4586a43bd5ed12d /memory | |
parent | e2cd95e595c39672fc17c7952ec895c13622703f (diff) | |
download | apr-9574eee23c9edcd7a991ef3d5e77e4ff90d9937c.tar.gz |
* Don't destroy our own pool mutex in apr_pool_clear.
git-svn-id: https://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 |