summaryrefslogtreecommitdiff
path: root/threadproc/win32
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2022-01-24 14:16:04 +0000
committerYann Ylavic <ylavic@apache.org>2022-01-24 14:16:04 +0000
commit3c0a292ceeabd8a58a984b3279097f033b44659c (patch)
treef5d9d63d4610bad63d8ff6756bbce6e974ce9f64 /threadproc/win32
parentd77a576daf76df4ea5c175ea156ade0ed7f844f1 (diff)
downloadapr-3c0a292ceeabd8a58a984b3279097f033b44659c.tar.gz
apr_thread: Follow up to r1897179: abort_fn on apr_allocator_create() failure.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1897419 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc/win32')
-rw-r--r--threadproc/win32/thread.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/threadproc/win32/thread.c b/threadproc/win32/thread.c
index 3d0cd535b..281a44ac6 100644
--- a/threadproc/win32/thread.c
+++ b/threadproc/win32/thread.c
@@ -104,6 +104,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;
@@ -115,10 +116,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;