From: Ruslan Ermilov Date: Tue, 3 Dec 2013 11:11:24 +0000 (+0400) Subject: Fixed null pointer dereference with $upstream_cache_last_modified. X-Git-Tag: release-1.5.8~27 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/static/gitweb.js?a=commitdiff_plain;h=04199332832568384202111ae0e75d90b69b0d01;p=nginx.git Fixed null pointer dereference with $upstream_cache_last_modified. --- diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 9570ccc7e..c148f38d0 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -4555,7 +4555,8 @@ ngx_http_upstream_cache_last_modified(ngx_http_request_t *r, { u_char *p; - if (!r->upstream->conf->cache_revalidate + if (r->upstream == NULL + || !r->upstream->conf->cache_revalidate || r->upstream->cache_status != NGX_HTTP_CACHE_EXPIRED || r->cache->last_modified == -1) {