fix segfault if no server_name was defined
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 462393b..b5f24d9 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c
@@ -2292,9 +2292,12 @@ 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,