diff src/core/ngx_buf.c @ 7282:da9941c9b01b

Leave chain in ngx_chain_add_copy() in consistent state on errors.
author Sergey Kandaurov <pluknet@nginx.com>
date Mon, 04 Jun 2018 18:47:54 +0300
parents 7cc2d3a96ea3
children c7a8bdf5af55
line wrap: on
line diff
--- 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
     while (in) {
         cl = ngx_alloc_chain_link(pool);
         if (cl == NULL) {
+            *ll = NULL;
             return NGX_ERROR;
         }