# HG changeset patch # User Igor Sysoev # Date 1192627346 0 # Node ID c9a0f82deb7ce688c5ed9ae3fb509fde4faca062 # Parent aa1835ad46ba4b7d1b45b072482757c498ea5583 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 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -2292,9 +2292,12 @@ ngx_http_core_merge_srv_conf(ngx_conf_t 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,