Leave chain in ngx_chain_add_copy() in consistent state on errors.

This commit is contained in:
Sergey Kandaurov 2018-06-04 18:47:54 +03:00
parent 95679ba70b
commit 6da95a2b3a

View file

@ -137,6 +137,7 @@ ngx_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **chain, ngx_chain_t *in)
while (in) {
cl = ngx_alloc_chain_link(pool);
if (cl == NULL) {
*ll = NULL;
return NGX_ERROR;
}