changeset 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 bd6563e81cea
children d0b897c0bb5b
files src/core/ngx_buf.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/ngx_buf.c	Wed May 30 15:40:34 2018 +0300
+++ b/src/core/ngx_buf.c	Mon Jun 04 18:47:54 2018 +0300
@@ -137,6 +137,7 @@
     while (in) {
         cl = ngx_alloc_chain_link(pool);
         if (cl == NULL) {
+            *ll = NULL;
             return NGX_ERROR;
         }