From: Christophe Jaillet Date: Thu, 5 Feb 2015 21:03:04 +0000 (+0000) Subject: Save a few bytes in conf pool when parsing some directives. Use temp_pool when applic... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7bf355e3a74804f329f8545ca714f9afc4665d1;p=thirdparty%2Fapache%2Fhttpd.git Save a few bytes in conf pool when parsing some directives. Use temp_pool when applicable. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1657692 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/filters/mod_filter.c b/modules/filters/mod_filter.c index 8fb872cdbf2..bd2cf7ac176 100644 --- a/modules/filters/mod_filter.c +++ b/modules/filters/mod_filter.c @@ -362,7 +362,7 @@ static const char *filter_protocol(cmd_parms *cmd, void *CFG, const char *fname, } /* Now set flags from our args */ - for (arg = apr_strtok(apr_pstrdup(cmd->pool, proto), sep, &tok); + for (arg = apr_strtok(apr_pstrdup(cmd->temp_pool, proto), sep, &tok); arg; arg = apr_strtok(NULL, sep, &tok)) { if (!strcasecmp(arg, "change=yes")) { diff --git a/os/unix/unixd.c b/os/unix/unixd.c index bcb97a57db0..d7042bf6867 100644 --- a/os/unix/unixd.c +++ b/os/unix/unixd.c @@ -74,7 +74,7 @@ AP_DECLARE(void) ap_unixd_set_rlimit(cmd_parms *cmd, struct rlimit **plimit, return; } - if (*(str = ap_getword_conf(cmd->pool, &arg)) != '\0') { + if (*(str = ap_getword_conf(cmd->temp_pool, &arg)) != '\0') { if (!strcasecmp(str, "max")) { cur = limit->rlim_max; } @@ -88,7 +88,7 @@ AP_DECLARE(void) ap_unixd_set_rlimit(cmd_parms *cmd, struct rlimit **plimit, return; } - if (arg2 && (*(str = ap_getword_conf(cmd->pool, &arg2)) != '\0')) { + if (arg2 && (*(str = ap_getword_conf(cmd->temp_pool, &arg2)) != '\0')) { max = atol(str); } diff --git a/server/mpm_common.c b/server/mpm_common.c index 387c5cd06b0..d5b446d2c5a 100644 --- a/server/mpm_common.c +++ b/server/mpm_common.c @@ -360,7 +360,7 @@ const char *ap_mpm_set_coredumpdir(cmd_parms *cmd, void *dummy, return err; } - fname = ap_server_root_relative(cmd->pool, arg); + fname = ap_server_root_relative(cmd->temp_pool, arg); if (!fname) { return apr_pstrcat(cmd->pool, "Invalid CoreDumpDirectory path ", arg, NULL);