diff src/http/ngx_http_variables.c @ 797:36f7b549f481

fix segfault if $server_addr failed
author Igor Sysoev <igor@sysoev.ru>
date Fri, 20 Oct 2006 19:07:50 +0000
parents ff16489f1eac
children 97e89a42711f
line wrap: on
line diff
--- a/src/http/ngx_http_variables.c
+++ b/src/http/ngx_http_variables.c
@@ -367,7 +367,7 @@ ngx_http_get_indexed_variable(ngx_http_r
     r->variables[index].valid = 0;
     r->variables[index].not_found = 1;
 
-    return NULL;
+    return &r->variables[index];
 }