fix segfault introduced in r2602 if there is 502/504 error

and proxy/fastcgi_cache is defined without proxy/fastcgi_cache_valid
This commit is contained in:
Igor Sysoev 2009-03-30 14:23:07 +00:00
parent f072a02ec5
commit 91db11b32c

View File

@ -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++) {