diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-03-30 14:23:07 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-03-30 14:23:07 +0000 |
commit | 91db11b32cec8f9ebeec3a79a686020db9136b72 (patch) | |
tree | 71a528876f54d6959f18c67254d4bcc323568597 | |
parent | f072a02ec51385d97cc5033dc9e26e5daa64837d (diff) | |
download | nginx-91db11b32cec8f9ebeec3a79a686020db9136b72.tar.gz nginx-91db11b32cec8f9ebeec3a79a686020db9136b72.zip |
fix segfault introduced in r2602 if there is 502/504 error
and proxy/fastcgi_cache is defined without proxy/fastcgi_cache_valid
-rw-r--r-- | src/http/ngx_http_file_cache.c | 4 |
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++) { |