changeset 2413:89ac47d91fc1

fix segfault
author Igor Sysoev <igor@sysoev.ru>
date Wed, 17 Dec 2008 16:07:58 +0000
parents 086c20fe2e97
children cc13ff6d5c07
files src/http/ngx_http_upstream.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -2488,7 +2488,9 @@ ngx_http_upstream_finalize_request(ngx_h
     ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
                    "finalize http upstream request: %i", rc);
 
-    *u->cleanup = NULL;
+    if (u->cleanup) {
+        *u->cleanup = NULL;
+    }
 
     if (u->state && u->state->response_sec) {
         tp = ngx_timeofday();