From dac90a4bff8404e8097249a1ee444b77580f43ba Mon Sep 17 00:00:00 2001 From: Sergey Kandaurov Date: Mon, 4 Jun 2018 18:47:54 +0300 Subject: Leave chain in ngx_chain_add_copy() in consistent state on errors. --- src/core/ngx_buf.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/core/ngx_buf.c b/src/core/ngx_buf.c index 1862a0606..c3783c446 100644 --- a/src/core/ngx_buf.c +++ b/src/core/ngx_buf.c @@ -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; } -- cgit