fielding 01/04/11 22:04:47
Modified: threadproc/win32 threadpriv.c
Log:
I don't think this routine is ever used, but the key needs to be
allocated (just like the other platforms) to avoid a null reference.
Submitted by: Christian Gross <[EMAIL PROTECTED]>
Reviewed by: Roy Fielding
Revision Changes Path
1.25 +8 -1 apr/threadproc/win32/threadpriv.c
Index: threadpriv.c
===================================================================
RCS file: /home/cvs/apr/threadproc/win32/threadpriv.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- threadpriv.c 2001/02/16 04:16:20 1.24
+++ threadpriv.c 2001/04/12 05:04:46 1.25
@@ -63,8 +63,15 @@
void (*dest)(void *),
apr_pool_t *cont)
{
+ (*key) = (apr_threadkey_t *)apr_palloc(cont, sizeof(apr_threadkey_t));
+ if ((*key) == NULL) {
+ return APR_ENOMEM;
+ }
+
+ (*key)->cntxt = cont;
+
if (((*key)->key = TlsAlloc()) != 0xFFFFFFFF) {
- return APR_SUCCESS;
+ return APR_SUCCESS;
}
return apr_get_os_error();
}