]> git.kaiwu.me - nginx.git/commitdiff
fix segfault if no server_name was defined
authorIgor Sysoev <igor@sysoev.ru>
Wed, 17 Oct 2007 13:22:26 +0000 (13:22 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Wed, 17 Oct 2007 13:22:26 +0000 (13:22 +0000)
src/http/ngx_http_core_module.c

index 462393b634fb8263e339aa50f731a5f255293c2a..b5f24d92b20cefd0052d601c970a2a913c91a169 100644 (file)
@@ -2292,9 +2292,12 @@ ngx_http_core_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
             return NGX_CONF_ERROR;
         }
 
+#if (NGX_PCRE)
+        sn->regex = NULL;
+#endif
+        sn->core_srv_conf = conf;
         sn->name.len = conf->server_name.len;
         sn->name.data = conf->server_name.data;
-        sn->core_srv_conf = conf;
     }
 
     ngx_conf_merge_size_value(conf->connection_pool_size,