You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ja...@apache.org on 2017/03/21 23:05:52 UTC

svn commit: r1788032 - /httpd/httpd/trunk/modules/generators/mod_autoindex.c

Author: jailletc36
Date: Tue Mar 21 23:05:52 2017
New Revision: 1788032

URL: http://svn.apache.org/viewvc?rev=1788032&view=rev
Log:
Save a few bytes in the conf pool.

'push_item' and 'add_alt' already duplicate their parameters, so we can safely use the temp_pool here.

Modified:
    httpd/httpd/trunk/modules/generators/mod_autoindex.c

Modified: httpd/httpd/trunk/modules/generators/mod_autoindex.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_autoindex.c?rev=1788032&r1=1788031&r2=1788032&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_autoindex.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_autoindex.c Tue Mar 21 23:05:52 2017
@@ -231,7 +231,7 @@ static const char *add_alt(cmd_parms *cm
         }
     }
     if (cmd->info == BY_ENCODING) {
-        char *tmp = apr_pstrdup(cmd->pool, to);
+        char *tmp = apr_pstrdup(cmd->temp_pool, to);
         ap_str_tolower(tmp);
         to = tmp;
     }
@@ -244,7 +244,7 @@ static const char *add_alt(cmd_parms *cm
 static const char *add_icon(cmd_parms *cmd, void *d, const char *icon,
                             const char *to)
 {
-    char *iconbak = apr_pstrdup(cmd->pool, icon);
+    char *iconbak = apr_pstrdup(cmd->temp_pool, icon);
 
     if (icon[0] == '(') {
         char *alt;
@@ -253,7 +253,7 @@ static const char *add_icon(cmd_parms *c
         if (cl == NULL) {
             return "missing closing paren";
         }
-        alt = ap_getword_nc(cmd->pool, &iconbak, ',');
+        alt = ap_getword_nc(cmd->temp_pool, &iconbak, ',');
         *cl = '\0';                             /* Lose closing paren */
         add_alt(cmd, d, &alt[1], to);
     }
@@ -263,7 +263,7 @@ static const char *add_icon(cmd_parms *c
         }
     }
     if (cmd->info == BY_ENCODING) {
-        char *tmp = apr_pstrdup(cmd->pool, to);
+        char *tmp = apr_pstrdup(cmd->temp_pool, to);
         ap_str_tolower(tmp);
         to = tmp;
     }