fix segfault if ngx_read_file() will fail

This commit is contained in:
Igor Sysoev 2009-03-24 15:03:38 +00:00
parent 63f52af737
commit 3afc10f507

View File

@ -251,6 +251,7 @@ ngx_http_file_cache_open(ngx_http_request_t *r)
"http file cache fd: %d", of.fd);
c->file.fd = of.fd;
c->file.log = r->connection->log;
c->buf = ngx_create_temp_buf(r->pool, c->body_start);
if (c->buf == NULL) {