striker 02/03/19 00:27:31
Modified: memory/unix apr_pools.c
Log:
Don't try to obtain a mutex if it was already destroyed...
Submitted by: Bill Stoddard
Revision Changes Path
1.161 +7 -0 apr/memory/unix/apr_pools.c
Index: apr_pools.c
===================================================================
RCS file: /home/cvs/apr/memory/unix/apr_pools.c,v
retrieving revision 1.160
retrieving revision 1.161
diff -u -r1.160 -r1.161
--- apr_pools.c 18 Mar 2002 15:01:42 -0000 1.160
+++ apr_pools.c 19 Mar 2002 08:27:30 -0000 1.161
@@ -686,6 +686,13 @@
* 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);
}
}