Klaus Demo nginx / 4df7aa6
Output chain: free chain links in ngx_chain_writer(). Maxim Dounin 7 years ago
1 changed file(s) with 13 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
653653 ngx_chain_writer_ctx_t *ctx = data;
654654
655655 off_t size;
656 ngx_chain_t *cl;
656 ngx_chain_t *cl, *ln, *chain;
657657 ngx_connection_t *c;
658658
659659 c = ctx->connection;
733733 return NGX_OK;
734734 }
735735
736 ctx->out = c->send_chain(c, ctx->out, ctx->limit);
736 chain = c->send_chain(c, ctx->out, ctx->limit);
737737
738738 ngx_log_debug1(NGX_LOG_DEBUG_CORE, c->log, 0,
739 "chain writer out: %p", ctx->out);
740
741 if (ctx->out == NGX_CHAIN_ERROR) {
739 "chain writer out: %p", chain);
740
741 if (chain == NGX_CHAIN_ERROR) {
742742 return NGX_ERROR;
743743 }
744
745 for (cl = ctx->out; cl && cl != chain; /* void */) {
746 ln = cl;
747 cl = cl->next;
748 ngx_free_chain(ctx->pool, ln);
749 }
750
751 ctx->out = chain;
744752
745753 if (ctx->out == NULL) {
746754 ctx->last = &ctx->out;