]> granicus.if.org Git - apache/commitdiff
Fixed some bucket memory leaks in ap_http_filter()
authorBrian Pane <brianp@apache.org>
Fri, 6 Sep 2002 01:18:55 +0000 (01:18 +0000)
committerBrian Pane <brianp@apache.org>
Fri, 6 Sep 2002 01:18:55 +0000 (01:18 +0000)
Submitted by: Joe Schaefer <joe+apache@sunstarsys.com>

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

CHANGES
modules/http/http_protocol.c

diff --git a/CHANGES b/CHANGES
index 8398241ab6aaab80c1ea00d17698935c17769745..40563355e81beccc9da763a9bbd4b7a3719af84b 100644 (file)
--- 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 <joe+apache@sunstarsys.com>]
+
   *) Add ModMimeUsePathInfo directive.  [Justin Erenkrantz]
 
   *) mod_cache: added support for caching streamed responses (proxy,
index c30e56d00f45eb0b3cedef41490a09db37d63cc0..5087425b50aaa561290bd61422b7c689fb8b4e65 100644 (file)
@@ -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);