summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2022-01-19 17:18:40 +0000
committerYann Ylavic <ylavic@apache.org>2022-01-19 17:18:40 +0000
commitb01866fd88453ac5b221386dfb233e692a80cc80 (patch)
treed10901d4be569c49a4b7a34fd94eb7e46fc4aa18
parent7ede1bf8c1c8e638124c46e2458fe17ce47f4747 (diff)
downloadapr-b01866fd88453ac5b221386dfb233e692a80cc80.tar.gz
apr_thread: Follow up to r1897210: 1.7.x has a _WIN32_WCE error path too.
Destroy the pool if Windows' apr_thread_crate() fails on _WIN32_WCE, the merge in r1897210 applied its changes to the other case (known to trunk) only. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1897211 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--threadproc/win32/thread.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/threadproc/win32/thread.c b/threadproc/win32/thread.c
index 12d553859..6b04abb98 100644
--- a/threadproc/win32/thread.c
+++ b/threadproc/win32/thread.c
@@ -139,7 +139,9 @@ APR_DECLARE(apr_status_t) apr_thread_create(apr_thread_t **new,
attr && attr->stacksize > 0 ? attr->stacksize : 0,
(unsigned int (APR_THREAD_FUNC *)(void *))dummy_worker,
(*new), 0, &temp)) == 0) {
- return apr_get_os_error();
+ stat = apr_get_os_error();
+ apr_pool_destroy((*new)->pool);
+ return stat;
}
#endif
if (attr && attr->detach) {