From e512e00ab5923b1c907734592e1fcad343c4739c Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Wed, 11 Oct 2000 17:37:22 +0000 Subject: [PATCH] In getline() and ap_get_client_block(), use ap_bucket_destroy() 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 646e3d40e8..9d7b51f608 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -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;