# HG changeset patch # User Igor Sysoev # Date 1238422987 0 # Node ID b0cfe5f66e8d224c4add4366beeba23e9f9b295f # Parent 754ab3d3fe186154c3ef536eb1c428beb6f8688c fix segfault introduced in r2602 if there is 502/504 error and proxy/fastcgi_cache is defined without proxy/fastcgi_cache_valid 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 @@ -1290,6 +1290,10 @@ ngx_http_file_cache_valid(ngx_array_t *c 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++) {