You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@locus.apache.org on 2000/02/28 20:14:35 UTC
cvs commit: apache-2.0/src/lib/apr/lib apr_pools.c
rbb 00/02/28 11:14:35
Modified: src/lib/apr/lib apr_pools.c
Log:
Check return code from ap_create_lock.
Submitted by: Jeff Trawick
Reviewed by: Ryan Bloom
Revision Changes Path
1.32 +6 -2 apache-2.0/src/lib/apr/lib/apr_pools.c
Index: apr_pools.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/lib/apr_pools.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- apr_pools.c 2000/01/28 04:21:55 1.31
+++ apr_pools.c 2000/02/28 19:14:35 1.32
@@ -558,16 +558,20 @@
ap_pool_t *ap_init_alloc(void)
{
+ ap_status_t status1, status2;
#ifdef POOL_DEBUG
char s;
known_stack_point = &s;
stack_var_init(&s);
#endif
- ap_create_lock(&alloc_mutex, APR_MUTEX, APR_INTRAPROCESS,
+ status1 = ap_create_lock(&alloc_mutex, APR_MUTEX, APR_INTRAPROCESS,
NULL, NULL);
- ap_create_lock(&spawn_mutex, APR_MUTEX, APR_INTRAPROCESS,
+ status2 = ap_create_lock(&spawn_mutex, APR_MUTEX, APR_INTRAPROCESS,
NULL, NULL);
+ if (status1 != APR_SUCCESS || status2 != APR_SUCCESS) {
+ return NULL;
+ }
permanent_pool = ap_make_sub_pool(NULL, NULL);
#ifdef ALLOC_STATS