From: Brian Pane Date: Fri, 6 Sep 2002 01:18:55 +0000 (+0000) Subject: Fixed some bucket memory leaks in ap_http_filter() X-Git-Tag: AGB_BEFORE_AAA_CHANGES~48 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d6aa2b601fd7325be6c93545ea66abb6bafe6638;p=apache Fixed some bucket memory leaks in ap_http_filter() Submitted by: Joe Schaefer git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96662 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 8398241ab6..40563355e8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Changes with Apache 2.0.41 + *) Fix some bucket memory leaks in the chunking code + [Joe Schaefer ] + *) Add ModMimeUsePathInfo directive. [Justin Erenkrantz] *) mod_cache: added support for caching streamed responses (proxy, diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index c30e56d00f..5087425b50 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -904,11 +904,12 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b, ctx->remaining = get_chunk_size(line); } } + apr_brigade_cleanup(bb); + /* Detect chunksize error (such as overflow) */ if (rv != APR_SUCCESS || ctx->remaining < 0) { ctx->remaining = 0; /* Reset it in case we have to * come back here later */ - apr_brigade_cleanup(bb); e = ap_bucket_error_create(HTTP_REQUEST_ENTITY_TOO_LARGE, NULL, f->r->pool, f->c->bucket_alloc); @@ -969,13 +970,13 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b, ctx->remaining = get_chunk_size(line); } } + apr_brigade_cleanup(bb); } /* Detect chunksize error (such as overflow) */ if (rv != APR_SUCCESS || ctx->remaining < 0) { ctx->remaining = 0; /* Reset it in case we have to * come back here later */ - apr_brigade_cleanup(bb); e = ap_bucket_error_create(HTTP_REQUEST_ENTITY_TOO_LARGE, NULL, f->r->pool, f->c->bucket_alloc);