summaryrefslogtreecommitdiff
path: root/threadproc/unix
diff options
context:
space:
mode:
authorrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2001-09-02 03:44:37 +0000
committerrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2001-09-02 03:44:37 +0000
commiteeb2a9598c0b2ce5d328cee3ac5cc98474ff9229 (patch)
treed4e908b3df3fbf2e6a0c45701e780524245fcd3b /threadproc/unix
parentf85377e0044589bc1076b2eea3f4395d54c7efee (diff)
downloadlibapr-eeb2a9598c0b2ce5d328cee3ac5cc98474ff9229.tar.gz
Fix a seg-fault on Unix. It helps to allocate the structure before
we try to use it. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62278 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc/unix')
-rw-r--r--threadproc/unix/thread.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/threadproc/unix/thread.c b/threadproc/unix/thread.c
index 193be85f5..fe0ea337a 100644
--- a/threadproc/unix/thread.c
+++ b/threadproc/unix/thread.c
@@ -260,6 +260,7 @@ APR_DECLARE(apr_status_t) apr_thread_once_init(apr_thread_once_t **control,
{
static const pthread_once_t once_init = PTHREAD_ONCE_INIT;
+ *control = apr_palloc(p, sizeof(**control));
(*control)->once = once_init;
return APR_SUCCESS;
}