diff options
author | striker <striker@13f79535-47bb-0310-9956-ffa450edef68> | 2002-03-19 08:27:30 +0000 |
---|---|---|
committer | striker <striker@13f79535-47bb-0310-9956-ffa450edef68> | 2002-03-19 08:27:30 +0000 |
commit | b27a6ab4ffd45e4efc8cd3edbf14d5a398a1a561 (patch) | |
tree | 63e19553035a38c5dfeca87cb6613cd9cb2e547f /memory | |
parent | f3d5ceedb6ded998bb96078bbc8ac45f5b217db1 (diff) | |
download | libapr-b27a6ab4ffd45e4efc8cd3edbf14d5a398a1a561.tar.gz |
Don't try to obtain a mutex if it was already destroyed...
Submitted by: Bill Stoddard
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63155 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'memory')
-rw-r--r-- | memory/unix/apr_pools.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/memory/unix/apr_pools.c b/memory/unix/apr_pools.c index 63b320d0e..f2e0979e0 100644 --- a/memory/unix/apr_pools.c +++ b/memory/unix/apr_pools.c @@ -686,6 +686,13 @@ APR_DECLARE(void) apr_pool_destroy(apr_pool_t *pool) * in the allocator, it will have been destroyed by the cleanup function. */ if (apr_allocator_get_owner(allocator) == pool) { +#if APR_HAS_THREADS + /* Make sure to remove the lock, since it is highly likely to + * be invalid now. + */ + apr_allocator_set_mutex(allocator, NULL); +#endif /* APR_HAS_THREADS */ + apr_allocator_destroy(allocator); } } |