svn commit: r1927949 - apr/apr/trunk/memory/unix
| Newsgroups | gmane.comp.apache.apr.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: ylavic
Date: Thu Aug 21 14:17:29 2025
New Revision: 1927949
Log:
apr_pools: abort() if creating the pool mutex failed (APR_POOL_DEBUG mode).
* memory/unix/apr_pools.c
(apr_pool_create_ex_debug): Call abort_fn if any.
(apr_pool_create_unmanaged_ex_debug): Call abort_fn if any.
Modified:
apr/apr/trunk/memory/unix/apr_pools.c
Modified: apr/apr/trunk/memory/unix/apr_pools.c
==============================================================================
--- apr/apr/trunk/memory/unix/apr_pools.c Thu Aug 21 14:12:41 2025 (r1927948)
+++ apr/apr/trunk/memory/unix/apr_pools.c Thu Aug 21 14:17:29 2025 (r1927949)
@@ -2083,6 +2083,8 @@ APR_DECLARE(apr_status_t) apr_pool_creat
*/
if ((rv = apr_thread_mutex_create(&pool->mutex,
APR_THREAD_MUTEX_NESTED, pool)) != APR_SUCCESS) {
+ if (abort_fn)
+ abort_fn(rv);
free(pool);
return rv;
}
@@ -2172,6 +2174,8 @@ APR_DECLARE(apr_status_t) apr_pool_creat
*/
if ((rv = apr_thread_mutex_create(&pool->mutex,
APR_THREAD_MUTEX_NESTED, pool)) != APR_SUCCESS) {
+ if (abort_fn)
+ abort_fn(rv);
/* Free the allocator created/owned above eventually */
if (pool_allocator->owner == pool)
apr_allocator_destroy(pool_allocator);