leave chain in consistent state on errors

This commit is contained in:
Igor Sysoev 2009-06-02 16:07:13 +00:00
parent 65b091a131
commit 8b43700570

View file

@ -314,12 +314,11 @@ ngx_output_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **chain,
#endif #endif
cl->next = NULL;
*ll = cl; *ll = cl;
ll = &cl->next; ll = &cl->next;
} }
*ll = NULL;
return NGX_OK; return NGX_OK;
} }