summaryrefslogtreecommitdiff
path: root/threadproc/os2
diff options
context:
space:
mode:
authorBrian Havard <bjh@apache.org>2010-04-21 14:30:46 +0000
committerBrian Havard <bjh@apache.org>2010-04-21 14:30:46 +0000
commit61f5d3767e65c656696efe65f9b46a4a8fd9b3b8 (patch)
tree29515ccd1b4fc9d46537bae30001952d2026f201 /threadproc/os2
parent88fe0a093b7519a3709320d3e4a9182ff73cc993 (diff)
downloadapr-61f5d3767e65c656696efe65f9b46a4a8fd9b3b8.tar.gz
OS/2: Clean up a thread's pool when it terminates.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@936323 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc/os2')
-rw-r--r--threadproc/os2/thread.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/threadproc/os2/thread.c b/threadproc/os2/thread.c
index a75752f77..e2cf3f6a8 100644
--- a/threadproc/os2/thread.c
+++ b/threadproc/os2/thread.c
@@ -70,6 +70,7 @@ static void apr_thread_begin(void *arg)
{
apr_thread_t *thread = (apr_thread_t *)arg;
thread->exitval = thread->func(thread, thread->data);
+ apr_pool_destroy(thread->pool);
}
@@ -132,6 +133,7 @@ APR_DECLARE(apr_os_thread_t) apr_os_thread_current()
APR_DECLARE(apr_status_t) apr_thread_exit(apr_thread_t *thd, apr_status_t retval)
{
thd->exitval = retval;
+ apr_pool_destroy(thd->pool);
_endthread();
return -1; /* If we get here something's wrong */
}