]> granicus.if.org Git - apache/commitdiff
Delay some memory allocation.
authorChristophe Jaillet <jailletc36@apache.org>
Fri, 20 Apr 2018 19:33:51 +0000 (19:33 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Fri, 20 Apr 2018 19:33:51 +0000 (19:33 +0000)
If this handler will not handle the request, no need to waste bytes in the request pool.

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

modules/proxy/mod_proxy_ftp.c

index 38d93f3861388ccfc4e8fcaa2ffe5dfda6dc3f83..d979e9f9c448e6b122f049bdf4ecb889eb8b0cb8 100644 (file)
@@ -978,7 +978,7 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
     conn_rec *origin, *data = NULL;
     apr_status_t err = APR_SUCCESS;
     apr_status_t uerr = APR_SUCCESS;
-    apr_bucket_brigade *bb = apr_brigade_create(p, c->bucket_alloc);
+    apr_bucket_brigade *bb;
     char *buf, *connectname;
     apr_port_t connectport;
     char *ftpmessage = NULL;
@@ -1211,6 +1211,7 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
      * correct directory...
      */
 
+    bb = apr_brigade_create(p, c->bucket_alloc);
 
     /* possible results: */
     /* 120 Service ready in nnn minutes. */