summaryrefslogtreecommitdiff
path: root/modules/cache
diff options
context:
space:
mode:
authorChristophe Jaillet <jailletc36@apache.org>2018-02-19 06:20:26 +0000
committerChristophe Jaillet <jailletc36@apache.org>2018-02-19 06:20:26 +0000
commitc53e01afa445e7f4258a38129d9d297535d8e229 (patch)
treec3a69592a141b1cb67835ae127add574e2dd4861 /modules/cache
parent2b92ff77a749ba0ea5a6a6894ba111d69a72084a (diff)
downloadhttpd-c53e01afa445e7f4258a38129d9d297535d8e229.tar.gz
Save a few cycles.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1824716 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/cache')
-rw-r--r--modules/cache/mod_cache_socache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/cache/mod_cache_socache.c b/modules/cache/mod_cache_socache.c
index 0d76760c5b..4920dc232c 100644
--- a/modules/cache/mod_cache_socache.c
+++ b/modules/cache/mod_cache_socache.c
@@ -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') {