Mercurial > hg > nginx
diff src/http/ngx_http_core_module.c @ 2912:c7d57b539248
return NULL instead of NGX_CONF_ERROR on a create conf failure
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 02 Jun 2009 16:09:44 +0000 |
parents | 4f5753877376 |
children | b941147f2b2e |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c Tue Jun 02 16:08:38 2009 +0000 +++ b/src/http/ngx_http_core_module.c Tue Jun 02 16:09:44 2009 +0000 @@ -2703,14 +2703,14 @@ cmcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_core_main_conf_t)); if (cmcf == NULL) { - return NGX_CONF_ERROR; + return NULL; } if (ngx_array_init(&cmcf->servers, cf->pool, 4, sizeof(ngx_http_core_srv_conf_t *)) != NGX_OK) { - return NGX_CONF_ERROR; + return NULL; } cmcf->server_names_hash_max_size = NGX_CONF_UNSET_UINT; @@ -2762,7 +2762,7 @@ cscf = ngx_pcalloc(cf->pool, sizeof(ngx_http_core_srv_conf_t)); if (cscf == NULL) { - return NGX_CONF_ERROR; + return NULL; } /* @@ -2775,14 +2775,14 @@ sizeof(ngx_http_listen_t)) != NGX_OK) { - return NGX_CONF_ERROR; + return NULL; } if (ngx_array_init(&cscf->server_names, cf->temp_pool, 4, sizeof(ngx_http_server_name_t)) != NGX_OK) { - return NGX_CONF_ERROR; + return NULL; } cscf->connection_pool_size = NGX_CONF_UNSET_SIZE; @@ -2893,7 +2893,7 @@ lcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_core_loc_conf_t)); if (lcf == NULL) { - return NGX_CONF_ERROR; + return NULL; } /*