mirror of
https://github.com/nginx/nginx.git
synced 2025-06-10 19:42:39 +08:00
return NULL instead of NGX_CONF_ERROR on a create conf failure
This commit is contained in:
parent
05822df0cb
commit
260c4321d7
@ -216,7 +216,7 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
|
|||||||
|
|
||||||
if (module->create_conf) {
|
if (module->create_conf) {
|
||||||
rv = module->create_conf(cycle);
|
rv = module->create_conf(cycle);
|
||||||
if (rv == NGX_CONF_ERROR) {
|
if (rv == NULL) {
|
||||||
ngx_destroy_pool(pool);
|
ngx_destroy_pool(pool);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -550,7 +550,7 @@ ngx_devpoll_create_conf(ngx_cycle_t *cycle)
|
|||||||
|
|
||||||
dpcf = ngx_palloc(cycle->pool, sizeof(ngx_devpoll_conf_t));
|
dpcf = ngx_palloc(cycle->pool, sizeof(ngx_devpoll_conf_t));
|
||||||
if (dpcf == NULL) {
|
if (dpcf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
dpcf->changes = NGX_CONF_UNSET;
|
dpcf->changes = NGX_CONF_UNSET;
|
||||||
|
@ -552,7 +552,7 @@ ngx_epoll_create_conf(ngx_cycle_t *cycle)
|
|||||||
|
|
||||||
epcf = ngx_palloc(cycle->pool, sizeof(ngx_epoll_conf_t));
|
epcf = ngx_palloc(cycle->pool, sizeof(ngx_epoll_conf_t));
|
||||||
if (epcf == NULL) {
|
if (epcf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
epcf->events = NGX_CONF_UNSET;
|
epcf->events = NGX_CONF_UNSET;
|
||||||
|
@ -581,7 +581,7 @@ ngx_eventport_create_conf(ngx_cycle_t *cycle)
|
|||||||
|
|
||||||
epcf = ngx_palloc(cycle->pool, sizeof(ngx_eventport_conf_t));
|
epcf = ngx_palloc(cycle->pool, sizeof(ngx_eventport_conf_t));
|
||||||
if (epcf == NULL) {
|
if (epcf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
epcf->events = NGX_CONF_UNSET;
|
epcf->events = NGX_CONF_UNSET;
|
||||||
|
@ -768,7 +768,7 @@ ngx_kqueue_create_conf(ngx_cycle_t *cycle)
|
|||||||
|
|
||||||
kcf = ngx_palloc(cycle->pool, sizeof(ngx_kqueue_conf_t));
|
kcf = ngx_palloc(cycle->pool, sizeof(ngx_kqueue_conf_t));
|
||||||
if (kcf == NULL) {
|
if (kcf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
kcf->changes = NGX_CONF_UNSET;
|
kcf->changes = NGX_CONF_UNSET;
|
||||||
|
@ -691,7 +691,7 @@ ngx_rtsig_create_conf(ngx_cycle_t *cycle)
|
|||||||
|
|
||||||
rtscf = ngx_palloc(cycle->pool, sizeof(ngx_rtsig_conf_t));
|
rtscf = ngx_palloc(cycle->pool, sizeof(ngx_rtsig_conf_t));
|
||||||
if (rtscf == NULL) {
|
if (rtscf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
rtscf->signo = NGX_CONF_UNSET;
|
rtscf->signo = NGX_CONF_UNSET;
|
||||||
|
@ -1113,7 +1113,7 @@ ngx_event_create_conf(ngx_cycle_t *cycle)
|
|||||||
|
|
||||||
ecf = ngx_palloc(cycle->pool, sizeof(ngx_event_conf_t));
|
ecf = ngx_palloc(cycle->pool, sizeof(ngx_event_conf_t));
|
||||||
if (ecf == NULL) {
|
if (ecf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ecf->connections = NGX_CONF_UNSET_UINT;
|
ecf->connections = NGX_CONF_UNSET_UINT;
|
||||||
@ -1128,7 +1128,7 @@ ngx_event_create_conf(ngx_cycle_t *cycle)
|
|||||||
if (ngx_array_init(&ecf->debug_connection, cycle->pool, 4,
|
if (ngx_array_init(&ecf->debug_connection, cycle->pool, 4,
|
||||||
sizeof(ngx_event_debug_t)) == NGX_ERROR)
|
sizeof(ngx_event_debug_t)) == NGX_ERROR)
|
||||||
{
|
{
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -2115,7 +2115,7 @@ ngx_openssl_create_conf(ngx_cycle_t *cycle)
|
|||||||
|
|
||||||
oscf = ngx_pcalloc(cycle->pool, sizeof(ngx_openssl_conf_t));
|
oscf = ngx_pcalloc(cycle->pool, sizeof(ngx_openssl_conf_t));
|
||||||
if (oscf == NULL) {
|
if (oscf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -201,7 +201,7 @@ ngx_http_access_create_loc_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_access_loc_conf_t));
|
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_access_loc_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return conf;
|
return conf;
|
||||||
|
@ -212,7 +212,7 @@ ngx_http_addition_create_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_addition_conf_t));
|
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_addition_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -372,7 +372,7 @@ ngx_http_auth_basic_create_loc_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_auth_basic_loc_conf_t));
|
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_auth_basic_loc_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return conf;
|
return conf;
|
||||||
|
@ -632,7 +632,7 @@ ngx_http_autoindex_create_loc_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_palloc(cf->pool, sizeof(ngx_http_autoindex_loc_conf_t));
|
conf = ngx_palloc(cf->pool, sizeof(ngx_http_autoindex_loc_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
conf->enable = NGX_CONF_UNSET;
|
conf->enable = NGX_CONF_UNSET;
|
||||||
|
@ -423,7 +423,7 @@ ngx_http_browser_create_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_browser_conf_t));
|
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_browser_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1488,27 +1488,27 @@ ngx_http_charset_create_main_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
mcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_charset_main_conf_t));
|
mcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_charset_main_conf_t));
|
||||||
if (mcf == NULL) {
|
if (mcf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ngx_array_init(&mcf->charsets, cf->pool, 2, sizeof(ngx_http_charset_t))
|
if (ngx_array_init(&mcf->charsets, cf->pool, 2, sizeof(ngx_http_charset_t))
|
||||||
!= NGX_OK)
|
!= NGX_OK)
|
||||||
{
|
{
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ngx_array_init(&mcf->tables, cf->pool, 1,
|
if (ngx_array_init(&mcf->tables, cf->pool, 1,
|
||||||
sizeof(ngx_http_charset_tables_t))
|
sizeof(ngx_http_charset_tables_t))
|
||||||
!= NGX_OK)
|
!= NGX_OK)
|
||||||
{
|
{
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ngx_array_init(&mcf->recodes, cf->pool, 2,
|
if (ngx_array_init(&mcf->recodes, cf->pool, 2,
|
||||||
sizeof(ngx_http_charset_recode_t))
|
sizeof(ngx_http_charset_recode_t))
|
||||||
!= NGX_OK)
|
!= NGX_OK)
|
||||||
{
|
{
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return mcf;
|
return mcf;
|
||||||
@ -1522,7 +1522,7 @@ ngx_http_charset_create_loc_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
lcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_charset_loc_conf_t));
|
lcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_charset_loc_conf_t));
|
||||||
if (lcf == NULL) {
|
if (lcf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1154,7 +1154,7 @@ ngx_http_dav_create_loc_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_dav_loc_conf_t));
|
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_dav_loc_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1833,7 +1833,7 @@ ngx_http_fastcgi_create_loc_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_fastcgi_loc_conf_t));
|
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_fastcgi_loc_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1069,7 +1069,7 @@ ngx_http_gzip_create_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_gzip_conf_t));
|
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_gzip_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -251,7 +251,7 @@ ngx_http_gzip_static_create_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_palloc(cf->pool, sizeof(ngx_http_gzip_static_conf_t));
|
conf = ngx_palloc(cf->pool, sizeof(ngx_http_gzip_static_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
conf->enable = NGX_CONF_UNSET;
|
conf->enable = NGX_CONF_UNSET;
|
||||||
|
@ -421,7 +421,7 @@ ngx_http_headers_create_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_headers_conf_t));
|
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_headers_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -947,7 +947,7 @@ ngx_http_image_filter_create_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_image_filter_conf_t));
|
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_image_filter_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
conf->filter = NGX_CONF_UNSET_UINT;
|
conf->filter = NGX_CONF_UNSET_UINT;
|
||||||
|
@ -366,7 +366,7 @@ ngx_http_index_create_loc_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_palloc(cf->pool, sizeof(ngx_http_index_loc_conf_t));
|
conf = ngx_palloc(cf->pool, sizeof(ngx_http_index_loc_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
conf->indices = NULL;
|
conf->indices = NULL;
|
||||||
|
@ -522,7 +522,7 @@ ngx_http_limit_req_create_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_limit_req_conf_t));
|
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_limit_req_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -381,7 +381,7 @@ ngx_http_limit_zone_create_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_limit_zone_conf_t));
|
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_limit_zone_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -714,18 +714,18 @@ ngx_http_log_create_main_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_log_main_conf_t));
|
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_log_main_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ngx_array_init(&conf->formats, cf->pool, 4, sizeof(ngx_http_log_fmt_t))
|
if (ngx_array_init(&conf->formats, cf->pool, 4, sizeof(ngx_http_log_fmt_t))
|
||||||
!= NGX_OK)
|
!= NGX_OK)
|
||||||
{
|
{
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt = ngx_array_push(&conf->formats);
|
fmt = ngx_array_push(&conf->formats);
|
||||||
if (fmt == NULL) {
|
if (fmt == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt->name.len = sizeof("combined") - 1;
|
fmt->name.len = sizeof("combined") - 1;
|
||||||
@ -735,7 +735,7 @@ ngx_http_log_create_main_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
fmt->ops = ngx_array_create(cf->pool, 16, sizeof(ngx_http_log_op_t));
|
fmt->ops = ngx_array_create(cf->pool, 16, sizeof(ngx_http_log_op_t));
|
||||||
if (fmt->ops == NULL) {
|
if (fmt->ops == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return conf;
|
return conf;
|
||||||
@ -749,7 +749,7 @@ ngx_http_log_create_loc_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_log_loc_conf_t));
|
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_log_loc_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
conf->open_file_cache = NGX_CONF_UNSET_PTR;
|
conf->open_file_cache = NGX_CONF_UNSET_PTR;
|
||||||
|
@ -160,7 +160,7 @@ ngx_http_map_create_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
mcf = ngx_palloc(cf->pool, sizeof(ngx_http_map_conf_t));
|
mcf = ngx_palloc(cf->pool, sizeof(ngx_http_map_conf_t));
|
||||||
if (mcf == NULL) {
|
if (mcf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
mcf->hash_max_size = NGX_CONF_UNSET_UINT;
|
mcf->hash_max_size = NGX_CONF_UNSET_UINT;
|
||||||
|
@ -513,7 +513,7 @@ ngx_http_memcached_create_loc_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_memcached_loc_conf_t));
|
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_memcached_loc_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1883,7 +1883,7 @@ ngx_http_proxy_create_loc_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_proxy_loc_conf_t));
|
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_proxy_loc_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -280,7 +280,7 @@ ngx_http_random_index_create_loc_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_palloc(cf->pool, sizeof(ngx_http_random_index_loc_conf_t));
|
conf = ngx_palloc(cf->pool, sizeof(ngx_http_random_index_loc_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
conf->enable = NGX_CONF_UNSET;
|
conf->enable = NGX_CONF_UNSET;
|
||||||
|
@ -360,7 +360,7 @@ ngx_http_realip_create_loc_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_realip_loc_conf_t));
|
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_realip_loc_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -221,7 +221,7 @@ ngx_http_referer_create_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_referer_conf_t));
|
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_referer_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (NGX_PCRE)
|
#if (NGX_PCRE)
|
||||||
|
@ -220,7 +220,7 @@ ngx_http_rewrite_create_loc_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_rewrite_loc_conf_t));
|
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_rewrite_loc_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
conf->stack_size = NGX_CONF_UNSET_UINT;
|
conf->stack_size = NGX_CONF_UNSET_UINT;
|
||||||
|
@ -152,7 +152,7 @@ ngx_http_secure_link_create_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_secure_link_conf_t));
|
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_secure_link_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2689,14 +2689,14 @@ ngx_http_ssi_create_main_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
smcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_ssi_main_conf_t));
|
smcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_ssi_main_conf_t));
|
||||||
if (smcf == NULL) {
|
if (smcf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
smcf->commands.pool = cf->pool;
|
smcf->commands.pool = cf->pool;
|
||||||
smcf->commands.temp_pool = cf->temp_pool;
|
smcf->commands.temp_pool = cf->temp_pool;
|
||||||
|
|
||||||
if (ngx_hash_keys_array_init(&smcf->commands, NGX_HASH_SMALL) != NGX_OK) {
|
if (ngx_hash_keys_array_init(&smcf->commands, NGX_HASH_SMALL) != NGX_OK) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return smcf;
|
return smcf;
|
||||||
@ -2736,7 +2736,7 @@ ngx_http_ssi_create_loc_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
slcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_ssi_loc_conf_t));
|
slcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_ssi_loc_conf_t));
|
||||||
if (slcf == NULL) {
|
if (slcf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -302,7 +302,7 @@ ngx_http_ssl_create_srv_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
sscf = ngx_pcalloc(cf->pool, sizeof(ngx_http_ssl_srv_conf_t));
|
sscf = ngx_pcalloc(cf->pool, sizeof(ngx_http_ssl_srv_conf_t));
|
||||||
if (sscf == NULL) {
|
if (sscf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -638,7 +638,7 @@ ngx_http_sub_create_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
slcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_sub_loc_conf_t));
|
slcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_sub_loc_conf_t));
|
||||||
if (slcf == NULL) {
|
if (slcf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -570,7 +570,7 @@ ngx_http_userid_create_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_userid_conf_t));
|
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_userid_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1169,7 +1169,7 @@ ngx_http_xslt_filter_create_main_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_palloc(cf->pool, sizeof(ngx_http_xslt_filter_main_conf_t));
|
conf = ngx_palloc(cf->pool, sizeof(ngx_http_xslt_filter_main_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ngx_array_init(&conf->dtd_files, cf->pool, 1,
|
if (ngx_array_init(&conf->dtd_files, cf->pool, 1,
|
||||||
@ -1197,7 +1197,7 @@ ngx_http_xslt_filter_create_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_xslt_filter_loc_conf_t));
|
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_xslt_filter_loc_conf_t));
|
||||||
if (conf == NULL) {
|
if (conf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -784,7 +784,7 @@ ngx_http_perl_create_main_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
pmcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_perl_main_conf_t));
|
pmcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_perl_main_conf_t));
|
||||||
if (pmcf == NULL) {
|
if (pmcf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ngx_array_init(&pmcf->requires, cf->pool, 1, sizeof(u_char *))
|
if (ngx_array_init(&pmcf->requires, cf->pool, 1, sizeof(u_char *))
|
||||||
@ -869,7 +869,7 @@ ngx_http_perl_create_loc_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
plcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_perl_loc_conf_t));
|
plcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_perl_loc_conf_t));
|
||||||
if (plcf == NULL) {
|
if (plcf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -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));
|
cmcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_core_main_conf_t));
|
||||||
if (cmcf == NULL) {
|
if (cmcf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ngx_array_init(&cmcf->servers, cf->pool, 4,
|
if (ngx_array_init(&cmcf->servers, cf->pool, 4,
|
||||||
sizeof(ngx_http_core_srv_conf_t *))
|
sizeof(ngx_http_core_srv_conf_t *))
|
||||||
!= NGX_OK)
|
!= NGX_OK)
|
||||||
{
|
{
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmcf->server_names_hash_max_size = NGX_CONF_UNSET_UINT;
|
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));
|
cscf = ngx_pcalloc(cf->pool, sizeof(ngx_http_core_srv_conf_t));
|
||||||
if (cscf == NULL) {
|
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))
|
sizeof(ngx_http_listen_t))
|
||||||
!= NGX_OK)
|
!= NGX_OK)
|
||||||
{
|
{
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ngx_array_init(&cscf->server_names, cf->temp_pool, 4,
|
if (ngx_array_init(&cscf->server_names, cf->temp_pool, 4,
|
||||||
sizeof(ngx_http_server_name_t))
|
sizeof(ngx_http_server_name_t))
|
||||||
!= NGX_OK)
|
!= NGX_OK)
|
||||||
{
|
{
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
cscf->connection_pool_size = NGX_CONF_UNSET_SIZE;
|
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));
|
lcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_core_loc_conf_t));
|
||||||
if (lcf == NULL) {
|
if (lcf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -4182,7 +4182,7 @@ ngx_http_upstream_create_main_conf(ngx_conf_t *cf)
|
|||||||
sizeof(ngx_http_upstream_srv_conf_t *))
|
sizeof(ngx_http_upstream_srv_conf_t *))
|
||||||
!= NGX_OK)
|
!= NGX_OK)
|
||||||
{
|
{
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return umcf;
|
return umcf;
|
||||||
|
@ -1302,7 +1302,7 @@ ngx_mail_auth_http_create_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
ahcf = ngx_pcalloc(cf->pool, sizeof(ngx_mail_auth_http_conf_t));
|
ahcf = ngx_pcalloc(cf->pool, sizeof(ngx_mail_auth_http_conf_t));
|
||||||
if (ahcf == NULL) {
|
if (ahcf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ahcf->timeout = NGX_CONF_UNSET_MSEC;
|
ahcf->timeout = NGX_CONF_UNSET_MSEC;
|
||||||
|
@ -120,20 +120,20 @@ ngx_mail_core_create_main_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
cmcf = ngx_pcalloc(cf->pool, sizeof(ngx_mail_core_main_conf_t));
|
cmcf = ngx_pcalloc(cf->pool, sizeof(ngx_mail_core_main_conf_t));
|
||||||
if (cmcf == NULL) {
|
if (cmcf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ngx_array_init(&cmcf->servers, cf->pool, 4,
|
if (ngx_array_init(&cmcf->servers, cf->pool, 4,
|
||||||
sizeof(ngx_mail_core_srv_conf_t *))
|
sizeof(ngx_mail_core_srv_conf_t *))
|
||||||
!= NGX_OK)
|
!= NGX_OK)
|
||||||
{
|
{
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ngx_array_init(&cmcf->listen, cf->pool, 4, sizeof(ngx_mail_listen_t))
|
if (ngx_array_init(&cmcf->listen, cf->pool, 4, sizeof(ngx_mail_listen_t))
|
||||||
!= NGX_OK)
|
!= NGX_OK)
|
||||||
{
|
{
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return cmcf;
|
return cmcf;
|
||||||
|
@ -1061,7 +1061,7 @@ ngx_mail_proxy_create_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
pcf = ngx_pcalloc(cf->pool, sizeof(ngx_mail_proxy_conf_t));
|
pcf = ngx_pcalloc(cf->pool, sizeof(ngx_mail_proxy_conf_t));
|
||||||
if (pcf == NULL) {
|
if (pcf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
pcf->enable = NGX_CONF_UNSET;
|
pcf->enable = NGX_CONF_UNSET;
|
||||||
|
@ -166,7 +166,7 @@ ngx_mail_ssl_create_conf(ngx_conf_t *cf)
|
|||||||
|
|
||||||
scf = ngx_pcalloc(cf->pool, sizeof(ngx_mail_ssl_conf_t));
|
scf = ngx_pcalloc(cf->pool, sizeof(ngx_mail_ssl_conf_t));
|
||||||
if (scf == NULL) {
|
if (scf == NULL) {
|
||||||
return NGX_CONF_ERROR;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user