From 3e6470280797e9b4c8a2964cd77f3489cb7a1e91 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 2 Jun 2009 16:07:13 +0000 Subject: [PATCH] leave chain in consistent state on errors --- src/core/ngx_output_chain.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c index ee23e8fe1..6d6d241c1 100644 --- a/src/core/ngx_output_chain.c +++ b/src/core/ngx_output_chain.c @@ -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; }