From fef0c66526906b573436bc12f82388ed0aa2b02c Mon Sep 17 00:00:00 2001 From: Christophe Jaillet Date: Fri, 3 Jan 2014 21:42:40 +0000 Subject: [PATCH] Allocate correct size for the array to avoid useless memory allocation and copy git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1555259 13f79535-47bb-0310-9956-ffa450edef68 --- modules/core/mod_macro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/mod_macro.c b/modules/core/mod_macro.c index 34ae3ad3c6..831769999e 100644 --- a/modules/core/mod_macro.c +++ b/modules/core/mod_macro.c @@ -468,7 +468,7 @@ static const char *process_content(apr_pool_t * pool, int i; if (result) { - *result = apr_array_make(pool, 1, sizeof(char *)); + *result = apr_array_make(pool, contents->nelts, sizeof(char *)); } /* for each line of the macro body */ -- 2.50.1