From: Igor Sysoev Date: Wed, 17 Oct 2007 13:22:26 +0000 (+0000) Subject: fix segfault if no server_name was defined X-Git-Tag: release-0.6.15~15 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=12446d82496b9da38f0e638671a3082703f4c95d;p=nginx.git 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 462393b63..b5f24d92b 100644 --- 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 *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,