Mercurial > hg > nginx
changeset 2626:b0cfe5f66e8d
fix segfault introduced in r2602 if there is 502/504 error
and proxy/fastcgi_cache is defined without proxy/fastcgi_cache_valid
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 30 Mar 2009 14:23:07 +0000 |
parents | 754ab3d3fe18 |
children | c9da3e4dc706 |
files | src/http/ngx_http_file_cache.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_file_cache.c Mon Mar 30 14:15:47 2009 +0000 +++ b/src/http/ngx_http_file_cache.c Mon Mar 30 14:23:07 2009 +0000 @@ -1290,6 +1290,10 @@ 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++) {