comparison src/mail/ngx_mail_core_module.c @ 3237:2efa8d2fcde1 stable-0.7

merge r2903, r2911, r2912, r3002: fix various failures handling
author Igor Sysoev <igor@sysoev.ru>
date Mon, 26 Oct 2009 15:54:29 +0000
parents a96a8c916b0c
children 016352c19049 4919fb357a5d
comparison
equal deleted inserted replaced
3236:9aa8fd2d5a00 3237:2efa8d2fcde1
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