return NULL instead of NGX_CONF_ERROR on a create conf failure
diff --git a/src/mail/ngx_mail_auth_http_module.c b/src/mail/ngx_mail_auth_http_module.c
index f7ad308..acd0665 100644
--- a/src/mail/ngx_mail_auth_http_module.c
+++ b/src/mail/ngx_mail_auth_http_module.c
@@ -1302,7 +1302,7 @@
ahcf = ngx_pcalloc(cf->pool, sizeof(ngx_mail_auth_http_conf_t));
if (ahcf == NULL) {
- return NGX_CONF_ERROR;
+ return NULL;
}
ahcf->timeout = NGX_CONF_UNSET_MSEC;
diff --git a/src/mail/ngx_mail_core_module.c b/src/mail/ngx_mail_core_module.c
index d0addb0..bd2c916 100644
--- a/src/mail/ngx_mail_core_module.c
+++ b/src/mail/ngx_mail_core_module.c
@@ -120,20 +120,20 @@
cmcf = ngx_pcalloc(cf->pool, sizeof(ngx_mail_core_main_conf_t));
if (cmcf == NULL) {
- return NGX_CONF_ERROR;
+ return NULL;
}
if (ngx_array_init(&cmcf->servers, cf->pool, 4,
sizeof(ngx_mail_core_srv_conf_t *))
!= NGX_OK)
{
- return NGX_CONF_ERROR;
+ return NULL;
}
if (ngx_array_init(&cmcf->listen, cf->pool, 4, sizeof(ngx_mail_listen_t))
!= NGX_OK)
{
- return NGX_CONF_ERROR;
+ return NULL;
}
return cmcf;
diff --git a/src/mail/ngx_mail_proxy_module.c b/src/mail/ngx_mail_proxy_module.c
index 193df8a..b408ed7 100644
--- a/src/mail/ngx_mail_proxy_module.c
+++ b/src/mail/ngx_mail_proxy_module.c
@@ -1061,7 +1061,7 @@
pcf = ngx_pcalloc(cf->pool, sizeof(ngx_mail_proxy_conf_t));
if (pcf == NULL) {
- return NGX_CONF_ERROR;
+ return NULL;
}
pcf->enable = NGX_CONF_UNSET;
diff --git a/src/mail/ngx_mail_ssl_module.c b/src/mail/ngx_mail_ssl_module.c
index 4e2bda5..1fcdb75 100644
--- a/src/mail/ngx_mail_ssl_module.c
+++ b/src/mail/ngx_mail_ssl_module.c
@@ -166,7 +166,7 @@
scf = ngx_pcalloc(cf->pool, sizeof(ngx_mail_ssl_conf_t));
if (scf == NULL) {
- return NGX_CONF_ERROR;
+ return NULL;
}
/*