From: Stefan Fritsch Date: Tue, 28 Sep 2010 13:19:33 +0000 (+0000) Subject: save some memory by using cmd->temp_pool instead of cmd->pool in some places X-Git-Tag: 2.3.9~401 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=affc4cf328a12f0a77f9788d2d4a517e1c9d7b53;p=apache save some memory by using cmd->temp_pool instead of cmd->pool in some places git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1002156 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/filters/mod_reqtimeout.c b/modules/filters/mod_reqtimeout.c index 966a84dc3d..b0de997b8e 100644 --- a/modules/filters/mod_reqtimeout.c +++ b/modules/filters/mod_reqtimeout.c @@ -487,7 +487,7 @@ static const char *set_reqtimeouts(cmd_parms *cmd, void *mconfig, char *word, *val; const char *err; - word = ap_getword_conf(cmd->pool, &arg); + word = ap_getword_conf(cmd->temp_pool, &arg); val = strchr(word, '='); if (!val) { return "Invalid RequestReadTimeout parameter. Parameter must be " diff --git a/modules/lua/mod_lua.c b/modules/lua/mod_lua.c index 3f088dd533..cf41f35384 100644 --- a/modules/lua/mod_lua.c +++ b/modules/lua/mod_lua.c @@ -446,7 +446,7 @@ static const char *register_named_block_function_hook(const char *name, else { const char *word; apr_size_t wordlen; - word = ap_getword_conf(cmd->pool, &line); + word = ap_getword_conf(cmd->temp_pool, &line); wordlen = strlen(word); if (wordlen == 0 || word[wordlen - 1] != '>') { return apr_pstrcat(cmd->pool, cmd->directive->directive, diff --git a/modules/mappers/mod_dir.c b/modules/mappers/mod_dir.c index 44ee31116f..f4c5202131 100644 --- a/modules/mappers/mod_dir.c +++ b/modules/mappers/mod_dir.c @@ -60,7 +60,7 @@ static const char *add_index(cmd_parms *cmd, void *dummy, const char *arg) if (count == 0 && !strcasecmp(w, "disabled")) { /* peek to see if "disabled" is first in a series of arguments */ const char *tt = t; - const char *ww = ap_getword_conf(cmd->pool, &tt); + const char *ww = ap_getword_conf(cmd->temp_pool, &tt); if (ww == NULL || !ww[0]) { /* "disabled" is first, and alone */ break; diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index 6e0929cfe2..1497f9d06f 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -2823,10 +2823,9 @@ static const char *cmd_rewriteoptions(cmd_parms *cmd, void *in_dconf, const char *option) { int options = 0; - char *w; while (*option) { - w = ap_getword_conf(cmd->pool, &option); + char *w = ap_getword_conf(cmd->temp_pool, &option); if (!strcasecmp(w, "inherit")) { options |= OPTION_INHERIT; diff --git a/modules/metadata/mod_headers.c b/modules/metadata/mod_headers.c index 549adbda50..6742489342 100644 --- a/modules/metadata/mod_headers.c +++ b/modules/metadata/mod_headers.c @@ -520,14 +520,14 @@ static const char *header_cmd(cmd_parms *cmd, void *indirconf, const char *envclause; const char *subs; - action = ap_getword_conf(cmd->pool, &args); + action = ap_getword_conf(cmd->temp_pool, &args); if (cmd->info == &hdr_out) { if (!strcasecmp(action, "always")) { cmd->info = &hdr_err; - action = ap_getword_conf(cmd->pool, &args); + action = ap_getword_conf(cmd->temp_pool, &args); } else if (!strcasecmp(action, "onsuccess")) { - action = ap_getword_conf(cmd->pool, &args); + action = ap_getword_conf(cmd->temp_pool, &args); } } hdr = ap_getword_conf(cmd->pool, &args); diff --git a/modules/ssl/ssl_engine_config.c b/modules/ssl/ssl_engine_config.c index 78325a4d1d..225e999b4f 100644 --- a/modules/ssl/ssl_engine_config.c +++ b/modules/ssl/ssl_engine_config.c @@ -1081,7 +1081,7 @@ const char *ssl_cmd_SSLOptions(cmd_parms *cmd, char action, *w; while (*arg) { - w = ap_getword_conf(cmd->pool, &arg); + w = ap_getword_conf(cmd->temp_pool, &arg); action = NUL; if ((*w == '+') || (*w == '-')) { diff --git a/server/core.c b/server/core.c index ccb9d5e276..b9d9c9a0ed 100644 --- a/server/core.c +++ b/server/core.c @@ -1331,7 +1331,7 @@ static const char *set_override(cmd_parms *cmd, void *d_, const char *l) d->override = OR_NONE; while (l[0]) { - w = ap_getword_conf(cmd->pool, &l); + w = ap_getword_conf(cmd->temp_pool, &l); k = w; v = strchr(k, '='); @@ -1382,7 +1382,7 @@ static const char *set_options(cmd_parms *cmd, void *d_, const char *l) char action; while (l[0]) { - char *w = ap_getword_conf(cmd->pool, &l); + char *w = ap_getword_conf(cmd->temp_pool, &l); action = '\0'; if (*w == '+' || *w == '-') { @@ -1487,7 +1487,7 @@ static const char *set_etag_bits(cmd_parms *cmd, void *mconfig, action = '*'; bit = ETAG_UNSET; valid = 1; - token = ap_getword_conf(cmd->pool, &args); + token = ap_getword_conf(cmd->temp_pool, &args); if ((*token == '+') || (*token == '-')) { action = *token; token++;