aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_buf.c
diff options
context:
space:
mode:
authorSergey Kandaurov <pluknet@nginx.com>2018-06-04 18:47:54 +0300
committerSergey Kandaurov <pluknet@nginx.com>2018-06-04 18:47:54 +0300
commitdac90a4bff8404e8097249a1ee444b77580f43ba (patch)
tree294626e09ab428a511b9b689772bf628ca1f2892 /src/core/ngx_buf.c
parent7b9bc5d4d1c061095a2391dbe32cf4d205c031bc (diff)
downloadnginx-dac90a4bff8404e8097249a1ee444b77580f43ba.tar.gz
nginx-dac90a4bff8404e8097249a1ee444b77580f43ba.zip
Leave chain in ngx_chain_add_copy() in consistent state on errors.
Diffstat (limited to 'src/core/ngx_buf.c')
-rw-r--r--src/core/ngx_buf.c1
1 files changed, 1 insertions, 0 deletions
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;
}