apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwool...@apache.org
Subject cvs commit: apr-util/buckets apr_buckets_pool.c apr_buckets_heap.c
Date Fri, 29 Mar 2002 22:19:03 GMT
jwoolley    02/03/29 14:19:03

  Modified:    buckets  apr_buckets_pool.c apr_buckets_heap.c
  Log:
  Fix a sneaky segfault in heap_destroy when pool buckets are used and
  automatically turn themselves into heap buckets by their pool cleanup.
  
  Reported by: Doug MacEachern, Brad Nicholes
  
  Revision  Changes    Path
  1.28      +1 -0      apr-util/buckets/apr_buckets_pool.c
  
  Index: apr_buckets_pool.c
  ===================================================================
  RCS file: /home/cvs/apr-util/buckets/apr_buckets_pool.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -d -u -r1.27 -r1.28
  --- apr_buckets_pool.c	29 Mar 2002 08:12:08 -0000	1.27
  +++ apr_buckets_pool.c	29 Mar 2002 22:19:02 -0000	1.28
  @@ -150,6 +150,7 @@
       /* pre-initialize heap bucket member */
       p->heap.alloc_len = length;
       p->heap.base      = NULL;
  +    p->heap.free_func = apr_bucket_free;
   
       apr_pool_cleanup_register(p->pool, p, pool_bucket_cleanup,
                                 apr_pool_cleanup_null);
  
  
  
  1.42      +2 -0      apr-util/buckets/apr_buckets_heap.c
  
  Index: apr_buckets_heap.c
  ===================================================================
  RCS file: /home/cvs/apr-util/buckets/apr_buckets_heap.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -d -u -r1.41 -r1.42
  --- apr_buckets_heap.c	29 Mar 2002 08:12:08 -0000	1.41
  +++ apr_buckets_heap.c	29 Mar 2002 22:19:03 -0000	1.42
  @@ -76,6 +76,8 @@
       }
   }
   
  +/* Warning: if you change this function, be sure to
  + * change apr_bucket_pool_make() too! */
   APU_DECLARE(apr_bucket *) apr_bucket_heap_make(apr_bucket *b, const char *buf,
                                                  apr_size_t length,
                                                  void (*free_func)(void *data))
  
  
  

Mime
View raw message