From 95b983130376c10cd42e4b32e345cfb3c876f55d Mon Sep 17 00:00:00 2001 From: Yann Ylavic Date: Thu, 10 Mar 2016 12:15:59 +0000 Subject: [PATCH] Merge r1601624 from trunk: Strip useless apr_brigade_cleanup() calls. Submitted/backported by: ylavic Reviewed by: jailletc36, jim, ylavic git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1734391 13f79535-47bb-0310-9956-ffa450edef68 --- modules/echo/mod_echo.c | 1 - modules/filters/mod_deflate.c | 2 -- modules/filters/mod_ratelimit.c | 1 - modules/filters/mod_substitute.c | 2 +- modules/generators/mod_cgi.c | 2 -- modules/proxy/mod_proxy_ftp.c | 1 - server/core_filters.c | 1 - 7 files changed, 1 insertion(+), 9 deletions(-) diff --git a/modules/echo/mod_echo.c b/modules/echo/mod_echo.c index b8943363cd..336f90f3fa 100644 --- a/modules/echo/mod_echo.c +++ b/modules/echo/mod_echo.c @@ -160,7 +160,6 @@ static int process_echo_connection(conn_rec *c) /* Something horribly wrong happened. Someone didn't block! */ if (APR_BRIGADE_EMPTY(bb)) { - apr_brigade_cleanup(bb); ap_log_error(APLOG_MARK, APLOG_INFO, rv, c->base_server, APLOGNO(01612) "ProtocolEcho: Error - read empty brigade from %s!", c->client_ip); diff --git a/modules/filters/mod_deflate.c b/modules/filters/mod_deflate.c index 60a136c0ac..9f6a8c921d 100644 --- a/modules/filters/mod_deflate.c +++ b/modules/filters/mod_deflate.c @@ -977,7 +977,6 @@ static apr_status_t deflate_out_filter(ap_filter_t *f, apr_bucket_delete(e); } - apr_brigade_cleanup(bb); return APR_SUCCESS; } @@ -1856,7 +1855,6 @@ static apr_status_t inflate_out_filter(ap_filter_t *f, apr_bucket_delete(e); } - apr_brigade_cleanup(bb); return APR_SUCCESS; } diff --git a/modules/filters/mod_ratelimit.c b/modules/filters/mod_ratelimit.c index 070530db9c..a2e9bd0197 100644 --- a/modules/filters/mod_ratelimit.c +++ b/modules/filters/mod_ratelimit.c @@ -116,7 +116,6 @@ rate_limit_filter(ap_filter_t *f, apr_bucket_brigade *input_bb) if (!APR_BRIGADE_EMPTY(ctx->holdingbb)) { APR_BRIGADE_CONCAT(bb, ctx->holdingbb); - apr_brigade_cleanup(ctx->holdingbb); } while (ctx->state == RATE_FULLSPEED && !APR_BRIGADE_EMPTY(bb)) { diff --git a/modules/filters/mod_substitute.c b/modules/filters/mod_substitute.c index 59f5bf3e32..99e82933ba 100644 --- a/modules/filters/mod_substitute.c +++ b/modules/filters/mod_substitute.c @@ -427,8 +427,8 @@ static apr_status_t substitute_filter(ap_filter_t *f, apr_bucket_brigade *bb) if (rv != APR_SUCCESS) goto err; APR_BRIGADE_CONCAT(ctx->passbb, ctx->pattbb); + apr_brigade_cleanup(ctx->linebb); } - apr_brigade_cleanup(ctx->linebb); APR_BUCKET_REMOVE(b); APR_BRIGADE_INSERT_TAIL(ctx->passbb, b); } diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c index 370c9e306a..000f06e5bd 100644 --- a/modules/generators/mod_cgi.c +++ b/modules/generators/mod_cgi.c @@ -924,8 +924,6 @@ static int cgi_handler(request_rec *r) AP_DEBUG_ASSERT(script_in != NULL); - apr_brigade_cleanup(bb); - #if APR_FILES_AS_SOCKETS apr_file_pipe_timeout_set(script_in, 0); apr_file_pipe_timeout_set(script_err, 0); diff --git a/modules/proxy/mod_proxy_ftp.c b/modules/proxy/mod_proxy_ftp.c index 8f889912d6..104736b242 100644 --- a/modules/proxy/mod_proxy_ftp.c +++ b/modules/proxy/mod_proxy_ftp.c @@ -2015,7 +2015,6 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker, #endif /* sanity check */ if (APR_BRIGADE_EMPTY(bb)) { - apr_brigade_cleanup(bb); break; } diff --git a/server/core_filters.c b/server/core_filters.c index 958055ba3d..ddc2ff7f0f 100644 --- a/server/core_filters.c +++ b/server/core_filters.c @@ -591,7 +591,6 @@ static void setaside_remaining_output(ap_filter_t *f, } ap_save_brigade(f, &(ctx->buffered_bb), &bb, ctx->deferred_write_pool); - apr_brigade_cleanup(bb); } } else if (ctx->deferred_write_pool) { -- 2.50.0