]> granicus.if.org Git - apache/commitdiff
In getline() and ap_get_client_block(), use ap_bucket_destroy()
authorJeff Trawick <trawick@apache.org>
Wed, 11 Oct 2000 17:37:22 +0000 (17:37 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 11 Oct 2000 17:37:22 +0000 (17:37 +0000)
instead of bucket->destroy().  bucket->destroy() wasn't being
called correctly and also we were leaking the storage for the
bucket itself since bucket->destroy() doesn't free the ap_bucket.
Submitted by: Ryan Bloom, Jeff Trawick

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86544 13f79535-47bb-0310-9956-ffa450edef68

modules/http/http_protocol.c

index 646e3d40e84f8d37d1b4233b6a79e658fc2257fa..9d7b51f6082526a016b0f5df55f443c6760431bd 100644 (file)
@@ -1007,7 +1007,7 @@ static int getline(char *s, int n, conn_rec *c, int fold)
     while (1) {
         while (e->length == 0) {
             AP_BUCKET_REMOVE(e);
-            e->destroy(e);
+            ap_bucket_destroy(e);
 
             ap_get_brigade(c->input_filters, b);
             if (!AP_BRIGADE_EMPTY(b)) {
@@ -1034,7 +1034,7 @@ static int getline(char *s, int n, conn_rec *c, int fold)
             apr_cpystrn(pos, temp, length + 1);
            
             AP_BUCKET_REMOVE(e);
-            e->destroy(e);
+            ap_bucket_destroy(e);
         }
         c->input_data = b;
         e = AP_BRIGADE_FIRST(b); 
@@ -2467,7 +2467,7 @@ API_EXPORT(long) ap_get_client_block(request_rec *r, char *buffer, int bufsiz)
                 ap_bucket *e = b;
                 b = AP_BUCKET_NEXT(e);
                 AP_BUCKET_REMOVE(e);
-                e->destroy(e);
+                ap_bucket_destroy(e);
             }
         } while (AP_BRIGADE_EMPTY(r->connection->input_data));
 
@@ -2481,7 +2481,7 @@ API_EXPORT(long) ap_get_client_block(request_rec *r, char *buffer, int bufsiz)
 
         memcpy(buffer, tempbuf, len_to_read);
         AP_BUCKET_REMOVE(b);
-        b->destroy(b);
+        ap_bucket_destroy(b);
 
         r->read_length += len_to_read;
         r->remaining -= len_to_read;