comparison src/http/modules/perl/ngx_http_perl_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 8e720b7fe6d2
children f54b02dbb12b 8254055b6693
comparison
equal deleted inserted replaced
2911:32b444fa2ca4 2912:c7d57b539248
782 { 782 {
783 ngx_http_perl_main_conf_t *pmcf; 783 ngx_http_perl_main_conf_t *pmcf;
784 784
785 pmcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_perl_main_conf_t)); 785 pmcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_perl_main_conf_t));
786 if (pmcf == NULL) { 786 if (pmcf == NULL) {
787 return NGX_CONF_ERROR; 787 return NULL;
788 } 788 }
789 789
790 if (ngx_array_init(&pmcf->requires, cf->pool, 1, sizeof(u_char *)) 790 if (ngx_array_init(&pmcf->requires, cf->pool, 1, sizeof(u_char *))
791 != NGX_OK) 791 != NGX_OK)
792 { 792 {
867 { 867 {
868 ngx_http_perl_loc_conf_t *plcf; 868 ngx_http_perl_loc_conf_t *plcf;
869 869
870 plcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_perl_loc_conf_t)); 870 plcf = ngx_pcalloc(cf->pool, sizeof(ngx_http_perl_loc_conf_t));
871 if (plcf == NULL) { 871 if (plcf == NULL) {
872 return NGX_CONF_ERROR; 872 return NULL;
873 } 873 }
874 874
875 /* 875 /*
876 * set by ngx_pcalloc(): 876 * set by ngx_pcalloc():
877 * 877 *