]> git.kaiwu.me - nginx.git/commitdiff
Leave chain in ngx_chain_add_copy() in consistent state on errors.
authorSergey Kandaurov <pluknet@nginx.com>
Mon, 4 Jun 2018 15:47:54 +0000 (18:47 +0300)
committerSergey Kandaurov <pluknet@nginx.com>
Mon, 4 Jun 2018 15:47:54 +0000 (18:47 +0300)
src/core/ngx_buf.c

index 1862a0606ab531f79ad4cfc0ae37f732c9fb8526..c3783c44670404b37242d85e30ccf9515b79032e 100644 (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;
         }