Skip to content

Commit 6c60fd0

Browse files
committed
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. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1927949 13f79535-47bb-0310-9956-ffa450edef68
1 parent 55364ad commit 6c60fd0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

memory/unix/apr_pools.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2083,6 +2083,8 @@ APR_DECLARE(apr_status_t) apr_pool_create_ex_debug(apr_pool_t **newpool,
20832083
*/
20842084
if ((rv = apr_thread_mutex_create(&pool->mutex,
20852085
APR_THREAD_MUTEX_NESTED, pool)) != APR_SUCCESS) {
2086+
if (abort_fn)
2087+
abort_fn(rv);
20862088
free(pool);
20872089
return rv;
20882090
}
@@ -2172,6 +2174,8 @@ APR_DECLARE(apr_status_t) apr_pool_create_unmanaged_ex_debug(apr_pool_t **newpoo
21722174
*/
21732175
if ((rv = apr_thread_mutex_create(&pool->mutex,
21742176
APR_THREAD_MUTEX_NESTED, pool)) != APR_SUCCESS) {
2177+
if (abort_fn)
2178+
abort_fn(rv);
21752179
/* Free the allocator created/owned above eventually */
21762180
if (pool_allocator->owner == pool)
21772181
apr_allocator_destroy(pool_allocator);

0 commit comments

Comments
 (0)