From: Christophe Jaillet Date: Sun, 8 Apr 2018 08:31:22 +0000 (+0000) Subject: Use apr_pcalloc in the 'create' function. All the fields are initialized in the ... X-Git-Tag: 2.5.0-alpha2-ci-test-only~2716 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0d1b2d8337921b0ff880480dd3c225675ae9496;p=thirdparty%2Fapache%2Fhttpd.git Use apr_pcalloc in the 'create' function. All the fields are initialized in the 'init' function, but it is It is cleaner and more future proof. Small style correction (remove extra spaces) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1828624 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/cache/mod_socache_redis.c b/modules/cache/mod_socache_redis.c index f7c1601f9fd..450f406fbba 100644 --- a/modules/cache/mod_socache_redis.c +++ b/modules/cache/mod_socache_redis.c @@ -79,7 +79,7 @@ static const char *socache_rd_create(ap_socache_instance_t **context, { ap_socache_instance_t *ctx; - *context = ctx = apr_palloc(p, sizeof *ctx); + *context = ctx = apr_pcalloc(p, sizeof *ctx); if (!arg || !*arg) { return "List of server names required to create redis socache."; @@ -468,7 +468,7 @@ static void register_hooks(apr_pool_t *p) static const command_rec socache_redis_cmds[] = { AP_INIT_TAKE1("RedisConnPoolTTL", socache_rd_set_ttl, NULL, RSRC_CONF, - "TTL used for the connection pool with the Redis server(s)"), + "TTL used for the connection pool with the Redis server(s)"), AP_INIT_TAKE1("RedisTimeout", socache_rd_set_rwto, NULL, RSRC_CONF, "R/W timeout used for the connection with the Redis server(s)"), {NULL}