]> granicus.if.org Git - apache/commitdiff
Merge r1601624 from trunk:
authorYann Ylavic <ylavic@apache.org>
Thu, 10 Mar 2016 12:15:59 +0000 (12:15 +0000)
committerYann Ylavic <ylavic@apache.org>
Thu, 10 Mar 2016 12:15:59 +0000 (12:15 +0000)
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
modules/filters/mod_deflate.c
modules/filters/mod_ratelimit.c
modules/filters/mod_substitute.c
modules/generators/mod_cgi.c
modules/proxy/mod_proxy_ftp.c
server/core_filters.c

index b8943363cd7465e3b3659086306812b11dfac1a5..336f90f3fa534285109c9fd8dca489e75020a7bc 100644 (file)
@@ -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);
index 60a136c0ac9dab41d575e5eb035b96f5b0ab94fc..9f6a8c921d0a38e5117f504c37fd528bfca1f9db 100644 (file)
@@ -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;
 }
 
index 070530db9c505e619cedde5d2de571de3300fe18..a2e9bd0197710ae321edc4e9a51a598601162a39 100644 (file)
@@ -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)) {
index 59f5bf3e32f8d4e60f55a2c467e6d4b39304f059..99e82933ba40877f4b55c47b6121a47d8bb33264 100644 (file)
@@ -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);
         }
index 370c9e306a9a976685c57644653532be8103e99c..000f06e5bd52a960560d358bddb08e27864db0d7 100644 (file)
@@ -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);
index 8f889912d6a512211b58ae0c4fc558da47f926b4..104736b24230bf2156d420db880410b4c40d3bc3 100644 (file)
@@ -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;
             }
 
index 958055ba3d84e49ec99bd5f1699e0de0f571f093..ddc2ff7f0fc9cdc5971b34e334334f23b91f6bd6 100644 (file)
@@ -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) {