nginx-0.1.28-RELEASE import
*) Bugfix: nginx hogs CPU while proxying the huge files.
*) Bugfix: nginx could not be built by gcc 4.0 on Linux.
diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c
index 313557d..fc8a0bf 100644
--- a/src/core/ngx_output_chain.c
+++ b/src/core/ngx_output_chain.c
@@ -119,8 +119,10 @@
/* get the free buf */
if (ctx->free) {
- ctx->buf = ctx->free->buf;
- ctx->free = ctx->free->next;
+ cl = ctx->free;
+ ctx->buf = cl->buf;
+ ctx->free = cl->next;
+ ngx_free_chain(ctx->pool, cl);
} else if (out || ctx->allocated == ctx->bufs.num) {