httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/include apr_buf.h
Date Tue, 11 Jul 2000 17:15:52 GMT
rbb         00/07/11 10:15:51

  Modified:    src/lib/apr/buckets ap_buf.c ap_mmap_buf.c
               src/lib/apr/include apr_buf.h
  Log:
  Fix the segfault that was happening with the current buckets.  Basically,
  with an MMAP bucket, there is nothing for us to free, so we shouldn't try
  to.
  
  Revision  Changes    Path
  1.2       +4 -2      apache-2.0/src/lib/apr/buckets/ap_buf.c
  
  Index: ap_buf.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/buckets/ap_buf.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ap_buf.c	2000/07/11 00:25:57	1.1
  +++ ap_buf.c	2000/07/11 17:15:50	1.2
  @@ -78,7 +78,7 @@
               break;
           case AP_BUCKET_mmap:
               newbuf->data = ap_mmap_bucket_create();
  -            newbuf->free = ap_mmap_bucket_destroy;
  +            newbuf->free = NULL;
               break;
           case AP_BUCKET_rmem:
           case AP_BUCKET_file:
  @@ -93,7 +93,9 @@
   
   APR_EXPORT(ap_status_t) ap_bucket_destroy(ap_bucket *e)
   {
  -    e->free(e);
  +    if (e->free) {
  +        e->free(e);
  +    }
       free(e);
       return APR_SUCCESS;
   }
  
  
  
  1.2       +0 -6      apache-2.0/src/lib/apr/buckets/ap_mmap_buf.c
  
  Index: ap_mmap_buf.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/buckets/ap_mmap_buf.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ap_mmap_buf.c	2000/07/11 00:25:57	1.1
  +++ ap_mmap_buf.c	2000/07/11 17:15:50	1.2
  @@ -67,12 +67,6 @@
       return newbuf;
   }
   
  -APR_EXPORT(void) ap_mmap_bucket_destroy(void *e)
  -{
  -    ap_bucket_mmap *d = (ap_bucket_mmap *)e;
  -    free(d);
  -}
  -
   APR_EXPORT(char *) ap_mmap_get_char_str(ap_bucket_mmap *b)
   {
       return b->data->mm;
  
  
  
  1.2       +1 -4      apache-2.0/src/lib/apr/include/apr_buf.h
  
  Index: apr_buf.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_buf.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apr_buf.h	2000/07/11 00:25:57	1.1
  +++ apr_buf.h	2000/07/11 17:15:51	1.2
  @@ -197,11 +197,8 @@
       ap_mmap_t *data;
   };
   
  -/* Create a read/write memory bucket */
  +/* Create a mmap memory bucket */
   APR_EXPORT(ap_bucket_mmap *) ap_mmap_bucket_create(void);
  -
  -/* destroy a read/write memory bucket */
  -APR_EXPORT(void) ap_mmap_bucket_destroy(void *e);
   
   /* Convert a mmap bucket into a char * */
   APR_EXPORT(char *) ap_mmap_get_char_str(ap_bucket_mmap *b);
  
  
  

Mime
View raw message