Mercurial > hg > nginx
comparison src/http/modules/ngx_http_xslt_filter_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 | 61d5b945730a |
children | 4cc8b90f8cef |
comparison
equal
deleted
inserted
replaced
2911:32b444fa2ca4 | 2912:c7d57b539248 |
---|---|
1167 { | 1167 { |
1168 ngx_http_xslt_filter_main_conf_t *conf; | 1168 ngx_http_xslt_filter_main_conf_t *conf; |
1169 | 1169 |
1170 conf = ngx_palloc(cf->pool, sizeof(ngx_http_xslt_filter_main_conf_t)); | 1170 conf = ngx_palloc(cf->pool, sizeof(ngx_http_xslt_filter_main_conf_t)); |
1171 if (conf == NULL) { | 1171 if (conf == NULL) { |
1172 return NGX_CONF_ERROR; | 1172 return NULL; |
1173 } | 1173 } |
1174 | 1174 |
1175 if (ngx_array_init(&conf->dtd_files, cf->pool, 1, | 1175 if (ngx_array_init(&conf->dtd_files, cf->pool, 1, |
1176 sizeof(ngx_http_xslt_file_t)) | 1176 sizeof(ngx_http_xslt_file_t)) |
1177 != NGX_OK) | 1177 != NGX_OK) |
1195 { | 1195 { |
1196 ngx_http_xslt_filter_loc_conf_t *conf; | 1196 ngx_http_xslt_filter_loc_conf_t *conf; |
1197 | 1197 |
1198 conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_xslt_filter_loc_conf_t)); | 1198 conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_xslt_filter_loc_conf_t)); |
1199 if (conf == NULL) { | 1199 if (conf == NULL) { |
1200 return NGX_CONF_ERROR; | 1200 return NULL; |
1201 } | 1201 } |
1202 | 1202 |
1203 /* | 1203 /* |
1204 * set by ngx_pcalloc(): | 1204 * set by ngx_pcalloc(): |
1205 * | 1205 * |