Mercurial > hg > nginx-vendor-0-8
diff src/event/ngx_event_pipe.c @ 56:3050baa54a26 NGINX_0_1_28
nginx 0.1.28
*) Bugfix: nginx hogs CPU while proxying the huge files.
*) Bugfix: nginx could not be built by gcc 4.0 on Linux.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Fri, 08 Apr 2005 00:00:00 +0400 |
parents | 72eb30262aac |
children | b55cbf18157e |
line wrap: on
line diff
--- a/src/event/ngx_event_pipe.c +++ b/src/event/ngx_event_pipe.c @@ -84,7 +84,7 @@ static ngx_int_t ngx_event_pipe_read_ups ssize_t n, size; ngx_int_t rc; ngx_buf_t *b; - ngx_chain_t *chain, *cl; + ngx_chain_t *chain, *cl, *ln; if (p->upstream_eof || p->upstream_error || p->upstream_done) { return NGX_OK; @@ -293,7 +293,9 @@ static ngx_int_t ngx_event_pipe_read_ups } n -= size; + ln = cl; cl = cl->next; + ngx_free_chain(p->pool, ln); } else { cl->buf->last += n; @@ -686,8 +688,10 @@ ngx_int_t ngx_event_pipe_copy_input_filt } if (p->free) { - b = p->free->buf; - p->free = p->free->next; + cl = p->free; + b = cl->buf; + p->free = cl->next; + ngx_free_chain(p->pool, cl); } else { b = ngx_alloc_buf(p->pool);