aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_file_cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/ngx_http_file_cache.c')
-rw-r--r--src/http/ngx_http_file_cache.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/http/ngx_http_file_cache.c b/src/http/ngx_http_file_cache.c
index 78f4773fc..0c23e46e0 100644
--- a/src/http/ngx_http_file_cache.c
+++ b/src/http/ngx_http_file_cache.c
@@ -1290,6 +1290,10 @@ ngx_http_file_cache_valid(ngx_array_t *cache_valid, ngx_uint_t status)
ngx_uint_t i;
ngx_http_cache_valid_t *valid;
+ if (cache_valid == NULL) {
+ return 0;
+ }
+
valid = cache_valid->elts;
for (i = 0; i < cache_valid->nelts; i++) {