diff options
Diffstat (limited to 'src/core/ngx_output_chain.c')
-rw-r--r-- | src/core/ngx_output_chain.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c index 313557d8e..fc8a0bf2a 100644 --- a/src/core/ngx_output_chain.c +++ b/src/core/ngx_output_chain.c @@ -119,8 +119,10 @@ ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in) /* 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) { |