diff options
author | rbb <rbb@13f79535-47bb-0310-9956-ffa450edef68> | 2001-09-02 03:44:37 +0000 |
---|---|---|
committer | rbb <rbb@13f79535-47bb-0310-9956-ffa450edef68> | 2001-09-02 03:44:37 +0000 |
commit | eeb2a9598c0b2ce5d328cee3ac5cc98474ff9229 (patch) | |
tree | d4e908b3df3fbf2e6a0c45701e780524245fcd3b /threadproc/unix | |
parent | f85377e0044589bc1076b2eea3f4395d54c7efee (diff) | |
download | libapr-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.c | 1 |
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; } |