summaryrefslogtreecommitdiff
path: root/threadproc/unix/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'threadproc/unix/thread.c')
-rw-r--r--threadproc/unix/thread.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/threadproc/unix/thread.c b/threadproc/unix/thread.c
index bb1db1e80..d4f13d964 100644
--- a/threadproc/unix/thread.c
+++ b/threadproc/unix/thread.c
@@ -166,6 +166,7 @@ static apr_status_t alloc_thread(apr_thread_t **new,
apr_pool_t *pool)
{
apr_status_t stat;
+ apr_abortfunc_t abort_fn = apr_pool_abort_get(pool);
apr_allocator_t *allocator;
apr_pool_t *p;
@@ -177,10 +178,11 @@ static apr_status_t alloc_thread(apr_thread_t **new,
*/
stat = apr_allocator_create(&allocator);
if (stat != APR_SUCCESS) {
+ if (abort_fn)
+ abort_fn(stat);
return stat;
}
- stat = apr_pool_create_unmanaged_ex(&p, apr_pool_abort_get(pool),
- allocator);
+ stat = apr_pool_create_unmanaged_ex(&p, abort_fn, allocator);
if (stat != APR_SUCCESS) {
apr_allocator_destroy(allocator);
return stat;