From: Christophe Jaillet Date: Mon, 19 Feb 2018 06:20:26 +0000 (+0000) Subject: Save a few cycles. X-Git-Tag: 2.5.0-alpha2-ci-test-only~2842 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c53e01afa445e7f4258a38129d9d297535d8e229;p=thirdparty%2Fapache%2Fhttpd.git Save a few cycles. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1824716 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/cache/mod_cache_socache.c b/modules/cache/mod_cache_socache.c index 0d76760c5ba..4920dc232c2 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') {