Mercurial > hg > nginx-vendor-current
diff src/core/ngx_buf.c @ 640:eb208e0cf44d NGINX_1_1_4
nginx 1.1.4
*) Feature: the ngx_http_upstream_keepalive module.
*) Feature: the "proxy_http_version" directive.
*) Feature: the "fastcgi_keep_conn" directive.
*) Feature: the "worker_aio_requests" directive.
*) Bugfix: if nginx was built --with-file-aio it could not be run on
Linux kernel which did not support AIO.
*) Bugfix: in Linux AIO error processing.
Thanks to Hagai Avrahami.
*) Bugfix: reduced memory consumption for long-lived requests.
*) Bugfix: the module ngx_http_mp4_module did not support 64-bit MP4
"co64" atom.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 20 Sep 2011 00:00:00 +0400 |
parents | fd759445d8a8 |
children | d0f7a625f27c |
line wrap: on
line diff
--- a/src/core/ngx_buf.c +++ b/src/core/ngx_buf.c @@ -180,7 +180,7 @@ ngx_chain_get_free_buf(ngx_pool_t *p, ng void -ngx_chain_update_chains(ngx_chain_t **free, ngx_chain_t **busy, +ngx_chain_update_chains(ngx_pool_t *p, ngx_chain_t **free, ngx_chain_t **busy, ngx_chain_t **out, ngx_buf_tag_t tag) { ngx_chain_t *cl; @@ -197,19 +197,21 @@ ngx_chain_update_chains(ngx_chain_t **fr *out = NULL; while (*busy) { - if (ngx_buf_size((*busy)->buf) != 0) { + cl = *busy; + + if (ngx_buf_size(cl->buf) != 0) { break; } - if ((*busy)->buf->tag != tag) { - *busy = (*busy)->next; + if (cl->buf->tag != tag) { + *busy = cl->next; + ngx_free_chain(p, cl); continue; } - (*busy)->buf->pos = (*busy)->buf->start; - (*busy)->buf->last = (*busy)->buf->start; + cl->buf->pos = cl->buf->start; + cl->buf->last = cl->buf->start; - cl = *busy; *busy = cl->next; cl->next = *free; *free = cl;