]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Save a few cycles.
authorChristophe Jaillet <jailletc36@apache.org>
Mon, 19 Feb 2018 06:20:26 +0000 (06:20 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Mon, 19 Feb 2018 06:20:26 +0000 (06:20 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1824716 13f79535-47bb-0310-9956-ffa450edef68

modules/cache/mod_cache_socache.c

index 0d76760c5bae7f78fd25a8a91e34849030366bab..4920dc232c2417bcf4675534080741ec69c8ca21 100644 (file)
@@ -217,8 +217,8 @@ static apr_status_t read_table(cache_handle_t *handle, request_rec *r,
             while (apr_isspace(buffer[colon]) && (colon < *slider)) {
                 colon++;
             }
-            apr_table_addn(table, apr_pstrndup(r->pool, (const char *) buffer
-                    + key, len - key), apr_pstrndup(r->pool,
+            apr_table_addn(table, apr_pstrmemdup(r->pool, (const char *) buffer
+                    + key, len - key), apr_pstrmemdup(r->pool,
                     (const char *) buffer + colon, *slider - colon));
             (*slider)++;
             if (buffer[*slider] == '\n') {