# HG changeset patch # User Dmitry Volyntsev # Date 1458731791 -10800 # Node ID 22c32937a41f8e6e5815a30a49a9de5b35c7bb63 # Parent e5076b96fd01afd9fad9e78303af60078c6aa77f Cache: fixed slots accounting error introduced in c9d680b00744. diff --git a/src/http/ngx_http_file_cache.c b/src/http/ngx_http_file_cache.c --- a/src/http/ngx_http_file_cache.c +++ b/src/http/ngx_http_file_cache.c @@ -2115,12 +2115,12 @@ ngx_http_file_cache_add(ngx_http_file_ca "could not allocate node%s", cache->shpool->log_ctx); } - cache->sh->count++; - ngx_shmtx_unlock(&cache->shpool->mutex); return NGX_ERROR; } + cache->sh->count++; + ngx_memcpy((u_char *) &fcn->node.key, c->key, sizeof(ngx_rbtree_key_t)); ngx_memcpy(fcn->key, &c->key[sizeof(ngx_rbtree_key_t)],