comparison src/mail/ngx_mail_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 a96a8c916b0c
children 016352c19049 4919fb357a5d
comparison
equal deleted inserted replaced
2911:32b444fa2ca4 2912:c7d57b539248
118 { 118 {
119 ngx_mail_core_main_conf_t *cmcf; 119 ngx_mail_core_main_conf_t *cmcf;
120 120
121 cmcf = ngx_pcalloc(cf->pool, sizeof(ngx_mail_core_main_conf_t)); 121 cmcf = ngx_pcalloc(cf->pool, sizeof(ngx_mail_core_main_conf_t));
122 if (cmcf == NULL) { 122 if (cmcf == NULL) {
123 return NGX_CONF_ERROR; 123 return NULL;
124 } 124 }
125 125
126 if (ngx_array_init(&cmcf->servers, cf->pool, 4, 126 if (ngx_array_init(&cmcf->servers, cf->pool, 4,
127 sizeof(ngx_mail_core_srv_conf_t *)) 127 sizeof(ngx_mail_core_srv_conf_t *))
128 != NGX_OK) 128 != NGX_OK)
129 { 129 {
130 return NGX_CONF_ERROR; 130 return NULL;
131 } 131 }
132 132
133 if (ngx_array_init(&cmcf->listen, cf->pool, 4, sizeof(ngx_mail_listen_t)) 133 if (ngx_array_init(&cmcf->listen, cf->pool, 4, sizeof(ngx_mail_listen_t))
134 != NGX_OK) 134 != NGX_OK)
135 { 135 {
136 return NGX_CONF_ERROR; 136 return NULL;
137 } 137 }
138 138
139 return cmcf; 139 return cmcf;
140 } 140 }
141 141