From: Christophe Jaillet Date: Fri, 20 Apr 2018 19:33:51 +0000 (+0000) Subject: Delay some memory allocation. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=917ee6ebdd52f234271cde67fd5043b61d5f7b1e;p=apache Delay some memory allocation. 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 --- diff --git a/modules/proxy/mod_proxy_ftp.c b/modules/proxy/mod_proxy_ftp.c index 38d93f3861..d979e9f9c4 100644 --- a/modules/proxy/mod_proxy_ftp.c +++ b/modules/proxy/mod_proxy_ftp.c @@ -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. */