apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stri...@apache.org
Subject cvs commit: apr/memory/unix apr_pools.c
Date Thu, 10 Jan 2002 18:52:50 GMT
striker     02/01/10 10:52:50

  Modified:    memory/unix apr_pools.c
  Log:
  Clear the pool struct when APR_POOL_DEBUG is defined.
  Also, protect the pool->mutex field with #if APR_HAS_THREADS.
  
  Submitted by: Jeff Trawick
  
  Revision  Changes    Path
  1.127     +4 -6      apr/memory/unix/apr_pools.c
  
  Index: apr_pools.c
  ===================================================================
  RCS file: /home/cvs/apr/memory/unix/apr_pools.c,v
  retrieving revision 1.126
  retrieving revision 1.127
  diff -u -r1.126 -r1.127
  --- apr_pools.c	1 Jan 2002 23:49:23 -0000	1.126
  +++ apr_pools.c	10 Jan 2002 18:52:49 -0000	1.127
  @@ -983,13 +983,9 @@
            return APR_ENOMEM;
       }
   
  +    memset(pool, 0, SIZEOF_POOL_T);
  +    
       pool->abort_fn = abort_fn;
  -    pool->child = NULL;
  -    pool->cleanups = NULL;
  -    pool->subprocesses = NULL;
  -    pool->user_data = NULL;
  -    pool->tag = NULL;
  -    pool->nodes = NULL;
   
       if ((flags & APR_POOL_FNEW_ALLOCATOR) == APR_POOL_FNEW_ALLOCATOR) {
   #if APR_HAS_THREADS
  @@ -1005,8 +1001,10 @@
   #endif
       }
       else {
  +#if APR_HAS_THREADS
           if (parent)
               pool->mutex = parent->mutex;
  +#endif
       }
   
       if ((pool->parent = parent) != NULL) {
  
  
  

Mime
View raw message