diff options
author | Christophe Jaillet <jailletc36@apache.org> | 2014-01-03 22:42:40 +0100 |
---|---|---|
committer | Christophe Jaillet <jailletc36@apache.org> | 2014-01-03 22:42:40 +0100 |
commit | fef0c66526906b573436bc12f82388ed0aa2b02c (patch) | |
tree | 84bfb808fc9a15df267c11e50a6873a6fa839ff6 /modules/core | |
parent | * Update comment. No functional change. (diff) | |
download | apache2-fef0c66526906b573436bc12f82388ed0aa2b02c.tar.xz apache2-fef0c66526906b573436bc12f82388ed0aa2b02c.zip |
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
Diffstat (limited to 'modules/core')
-rw-r--r-- | modules/core/mod_macro.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 */ |