From 12446d82496b9da38f0e638671a3082703f4c95d Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Wed, 17 Oct 2007 13:22:26 +0000 Subject: fix segfault if no server_name was defined --- src/http/ngx_http_core_module.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/http') 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, -- cgit