diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2009-06-02 16:09:44 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2009-06-02 16:09:44 +0000 |
| commit | 260c4321d71806f51d124d79cdff8e8e496a4956 (patch) | |
| tree | a6fe073d5f57d49b05562f9ce020b3a532c85c8c /src/http/ngx_http_core_module.c | |
| parent | 05822df0cb9dcf9909f4d82be7ce1becd108eeac (diff) | |
| download | nginx-260c4321d71806f51d124d79cdff8e8e496a4956.tar.gz nginx-260c4321d71806f51d124d79cdff8e8e496a4956.tar.bz2 | |
return NULL instead of NGX_CONF_ERROR on a create conf failure
Diffstat (limited to 'src/http/ngx_http_core_module.c')
| -rw-r--r-- | src/http/ngx_http_core_module.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index e2f7b8621..3d2ccd083 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -2703,14 +2703,14 @@ ngx_http_core_create_main_conf(ngx_conf_t *cf) 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 @@ ngx_http_core_create_srv_conf(ngx_conf_t *cf) 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 @@ ngx_http_core_create_srv_conf(ngx_conf_t *cf) 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 @@ ngx_http_core_create_loc_conf(ngx_conf_t *cf) lcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_core_loc_conf_t)); if (lcf == NULL) { - return NGX_CONF_ERROR; + return NULL; } /* |
