summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2016-12-14 20:16:59 +0100
committerYann Ylavic <ylavic@apache.org>2016-12-14 20:16:59 +0100
commit60586e25cf018d677df6c06caf7e986c08bcc3f7 (patch)
tree5693e18cc072c7ea34e63041ef7549f24b8cd0a1
parentshort-circuit some kinds of looping in RewriteRule. (diff)
downloadapache2-60586e25cf018d677df6c06caf7e986c08bcc3f7.tar.xz
apache2-60586e25cf018d677df6c06caf7e986c08bcc3f7.zip
http: release data buckets (memory, fd, ...) as soon as possible when
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
-rw-r--r--modules/http/http_filters.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/http/http_filters.c b/modules/http/http_filters.c
index fdc310a1e2..0cb49b1bee 100644
--- a/modules/http/http_filters.c
+++ b/modules/http/http_filters.c
@@ -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);
}
}
}