summaryrefslogtreecommitdiff
path: root/memory
diff options
context:
space:
mode:
authorsf <sf@13f79535-47bb-0310-9956-ffa450edef68>2013-05-10 20:58:54 +0000
committersf <sf@13f79535-47bb-0310-9956-ffa450edef68>2013-05-10 20:58:54 +0000
commit2f3a9ea7cfa118ba811070960bd449becacc9a83 (patch)
tree7212a14256f4372adcf5f95bc8c9eee9429d5f79 /memory
parentd7e60d1d7dd587a7faa47cf506e3064c3f289971 (diff)
downloadlibapr-2f3a9ea7cfa118ba811070960bd449becacc9a83.tar.gz
Pool debugging fixes
- avoid using a destroyed mutex in apr_pool_clear() - if we create a sub-pool, we don't need to own the pool. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1481186 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'memory')
-rw-r--r--memory/unix/apr_pools.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/memory/unix/apr_pools.c b/memory/unix/apr_pools.c
index 871e9fc23..45b2be2ca 100644
--- a/memory/unix/apr_pools.c
+++ b/memory/unix/apr_pools.c
@@ -1742,6 +1742,11 @@ APR_DECLARE(void) apr_pool_clear_debug(apr_pool_t *pool,
* the mutex we obtained above.
*/
if (mutex != pool->mutex) {
+ /*
+ * Prevent apr_palloc() in apr_thread_mutex_create() from trying to
+ * use the destroyed mutex.
+ */
+ pool->mutex = NULL;
(void)apr_thread_mutex_create(&pool->mutex,
APR_THREAD_MUTEX_NESTED, pool);
@@ -1818,7 +1823,7 @@ APR_DECLARE(apr_status_t) apr_pool_create_ex_debug(apr_pool_t **newpool,
parent = global_pool;
}
else {
- apr_pool_check_integrity(parent);
+ apr_pool_check_lifetime(parent);
if (!allocator)
allocator = parent->allocator;