]> granicus.if.org Git - apache/commitdiff
Merge r1657692, r1660800 from trunk
authorChristophe Jaillet <jailletc36@apache.org>
Fri, 27 Feb 2015 06:05:11 +0000 (06:05 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Fri, 27 Feb 2015 06:05:11 +0000 (06:05 +0000)
   * Save a few bytes in conf pool when parsing some directives. Use temp_pool
     when applicable.

Submitted by: jailletc36
Reviewed by: jailletc36, ylavic, covener
Backported by: jailletc36

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1662639 13f79535-47bb-0310-9956-ffa450edef68

STATUS
modules/filters/mod_filter.c
os/unix/unixd.c
server/config.c
server/mpm_common.c

diff --git a/STATUS b/STATUS
index 8a8834febac0b255281ad9d5d31f730b1f12541c..b3e6e9619cdb4ea23dd1e2b907afd493c42f14f4 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -112,13 +112,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
      2.4.x patch: trunk works (module CHANGES)
      +1: ylavic, wrowe, minfrin
 
-   * Save a few bytes in conf pool when parsing some directives. Use temp_pool
-     when applicable.
-     trunk patch: http://svn.apache.org/r1657692
-                  http://svn.apache.org/r1660800
-     2.4.x patch: trunk works
-     +1: jailletc36, ylavic, covener
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
 
index 8fb872cdbf28f17efe56a98ab2f397ad1821887f..bd2cf7ac1766b0dc6f2adb0b7b3f60ef0cd1dcac 100644 (file)
@@ -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")) {
index bcb97a57db04edbb1f0ece9555c900ba574c33be..d7042bf6867012853d952a334c7efe0d91f3bb6c 100644 (file)
@@ -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);
     }
 
index dada063c0624319a6fa26033241cabfb6fb8bb40..cc6070a235991de03d0f78205839f6766496e372 100644 (file)
@@ -1016,7 +1016,11 @@ static const char *invoke_cmd(const command_rec *cmd, cmd_parms *parms,
         return errmsg;
 
     case FLAG:
-        w = ap_getword_conf(parms->pool, &args);
+        /*
+         * This is safe to use temp_pool here, because the 'flag' itself is not
+         * forwarded as-is
+         */
+        w = ap_getword_conf(parms->temp_pool, &args);
 
         if (*w == '\0' || (strcasecmp(w, "on") && strcasecmp(w, "off")))
             return apr_pstrcat(parms->pool, cmd->name, " must be On or Off",
index a5980106829e9acdc9bbedfcfae0f8022499b849..e7121a772cdd3c0e1f798392e62665240b10c4ee 100644 (file)
@@ -343,7 +343,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);