changeset 2910:dc01b26f8de8

leave chain in consistent state on errors
author Igor Sysoev <igor@sysoev.ru>
date Tue, 02 Jun 2009 16:07:13 +0000
parents 3f287b615408
children 32b444fa2ca4
files src/core/ngx_output_chain.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/ngx_output_chain.c	Tue Jun 02 14:26:59 2009 +0000
+++ b/src/core/ngx_output_chain.c	Tue Jun 02 16:07:13 2009 +0000
@@ -314,12 +314,11 @@
 
 #endif
 
+        cl->next = NULL;
         *ll = cl;
         ll = &cl->next;
     }
 
-    *ll = NULL;
-
     return NGX_OK;
 }