]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
http: release data buckets (memory, fd, ...) as soon as possible when
authorYann Ylavic <ylavic@apache.org>
Wed, 14 Dec 2016 19:16:59 +0000 (19:16 +0000)
committerYann Ylavic <ylavic@apache.org>
Wed, 14 Dec 2016 19:16:59 +0000 (19:16 +0000)
filtered out from the outgoing brigade by ap_http_outerror_filter() applying
the EOC semantic.

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

modules/http/http_filters.c

index fdc310a1e2f330a9515d67e373b2a79553af45b1..0cb49b1bee0e42df2aca7b94177c22ada315bb48 100644 (file)
@@ -1806,12 +1806,12 @@ apr_status_t ap_http_outerror_filter(ap_filter_t *f,
      *              EOS bucket.
      */
     if (ctx->seen_eoc) {
-        for (e = APR_BRIGADE_FIRST(b);
-             e != APR_BRIGADE_SENTINEL(b);
-             e = APR_BUCKET_NEXT(e))
-        {
-            if (!APR_BUCKET_IS_METADATA(e)) {
-                APR_BUCKET_REMOVE(e);
+        e = APR_BRIGADE_FIRST(b);
+        while (e != APR_BRIGADE_SENTINEL(b)) {
+            apr_bucket *c = e;
+            e = APR_BUCKET_NEXT(e);
+            if (!APR_BUCKET_IS_METADATA(c)) {
+                apr_bucket_delete(c);
             }
         }
     }