comparison src/http/modules/ngx_http_referer_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 3e1c695258d3
children 98e288c6dac3 616ff375a68f
comparison
equal deleted inserted replaced
2911:32b444fa2ca4 2912:c7d57b539248
219 { 219 {
220 ngx_http_referer_conf_t *conf; 220 ngx_http_referer_conf_t *conf;
221 221
222 conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_referer_conf_t)); 222 conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_referer_conf_t));
223 if (conf == NULL) { 223 if (conf == NULL) {
224 return NGX_CONF_ERROR; 224 return NULL;
225 } 225 }
226 226
227 #if (NGX_PCRE) 227 #if (NGX_PCRE)
228 conf->regex = NGX_CONF_UNSET_PTR; 228 conf->regex = NGX_CONF_UNSET_PTR;
229 #endif 229 #endif