]> git.kaiwu.me - nginx.git/commitdiff
leave chain in consistent state on errors
authorIgor Sysoev <igor@sysoev.ru>
Tue, 2 Jun 2009 16:07:13 +0000 (16:07 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 2 Jun 2009 16:07:13 +0000 (16:07 +0000)
src/core/ngx_output_chain.c

index ee23e8fe183becd97020f93ae73e78d76ed7f0e5..6d6d241c1e7ea420c4136cb64ad7cfca62a73875 100644 (file)
@@ -314,12 +314,11 @@ ngx_output_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **chain,
 
 #endif
 
+        cl->next = NULL;
         *ll = cl;
         ll = &cl->next;
     }
 
-    *ll = NULL;
-
     return NGX_OK;
 }