diff options
author | Igor Sysoev <igor@sysoev.ru> | 2005-04-08 19:18:55 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2005-04-08 19:18:55 +0400 |
commit | 02f742b45eb8792053d3880641f45651d645e351 (patch) | |
tree | 1d5893bcc89c8f879712aa80f9a98a42f397e2c0 /src/event | |
parent | 87ff72436d289ae7b72a23138262e6d156490927 (diff) |
nginx-0.1.28-RELEASE importrelease-0.1.28
*) Bugfix: nginx hogs CPU while proxying the huge files.
*) Bugfix: nginx could not be built by gcc 4.0 on Linux.
Diffstat (limited to 'src/event')
-rw-r--r-- | src/event/ngx_event_pipe.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/event/ngx_event_pipe.c b/src/event/ngx_event_pipe.c index b5488ba7d..5f9d7c090 100644 --- 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_upstream(ngx_event_pipe_t *p) 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_upstream(ngx_event_pipe_t *p) } 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_filter(ngx_event_pipe_t *p, ngx_buf_t *buf) } 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); |