summaryrefslogtreecommitdiff
path: root/threadproc/win32/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'threadproc/win32/thread.c')
-rw-r--r--threadproc/win32/thread.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/threadproc/win32/thread.c b/threadproc/win32/thread.c
index 68251f881..7e1c1a8be 100644
--- a/threadproc/win32/thread.c
+++ b/threadproc/win32/thread.c
@@ -186,11 +186,12 @@ APR_DECLARE(apr_status_t) apr_thread_current_create(apr_thread_t **current,
stat = alloc_thread(current, attr, NULL, NULL, pool);
if (stat != APR_SUCCESS) {
+ *current = NULL;
return stat;
}
if (!(attr && attr->detach)) {
- (*new)->td = apr_os_thread_current();
+ (*current)->td = apr_os_thread_current();
}
#if APR_HAS_THREAD_LOCAL