From: Christophe Jaillet Date: Sat, 20 Aug 2016 15:50:22 +0000 (+0000) Subject: Delay some memory allocation in order to save 272 bytes in the 'request' memory pool... X-Git-Tag: 2.5.0-alpha~1238 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=96d3d172ea96f35bd5b08fd3de4a0f1c9d1685a3;p=thirdparty%2Fapache%2Fhttpd.git Delay some memory allocation in order to save 272 bytes in the 'request' memory pool if mod_status handler is triggered and is not able to handle the request git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1757010 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/generators/mod_status.c b/modules/generators/mod_status.c index 005bf046f2b..647c930ae2e 100644 --- a/modules/generators/mod_status.c +++ b/modules/generators/mod_status.c @@ -195,7 +195,7 @@ static int status_handler(request_rec *r) long req_time; int short_report; int no_table_report; - worker_score *ws_record = apr_palloc(r->pool, sizeof *ws_record); + worker_score *ws_record; process_score *ps_record; char *stat_buffer; pid_t *pid_buffer, worker_pid; @@ -293,6 +293,8 @@ static int status_handler(request_rec *r) } } + ws_record = apr_palloc(r->pool, sizeof *ws_record); + for (i = 0; i < server_limit; ++i) { #ifdef HAVE_TIMES clock_t proc_tu = 0, proc_ts = 0, proc_tcu = 0, proc_tcs = 0;