From b01866fd88453ac5b221386dfb233e692a80cc80 Mon Sep 17 00:00:00 2001 From: Yann Ylavic Date: Wed, 19 Jan 2022 17:18:40 +0000 Subject: 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 --- threadproc/win32/thread.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) { -- cgit v1.2.1