summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68>2022-01-19 17:18:40 +0000
committerylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68>2022-01-19 17:18:40 +0000
commitdacfb0e4510974e3d774faa6f772ac2a11ca69d5 (patch)
treed10901d4be569c49a4b7a34fd94eb7e46fc4aa18
parentc2649bcbe09f481b361292494cf883fa414e9d0c (diff)
downloadlibapr-dacfb0e4510974e3d774faa6f772ac2a11ca69d5.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) {