From e5e4c0000d1fa5a387c32bba0fd4fcad53fd3e9f Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Wed, 18 Apr 2007 11:28:11 +0000 Subject: fix segfault when *) perl was built without multiplicity *) when configuration was invalid --- src/http/modules/perl/ngx_http_perl_module.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/http/modules/perl/ngx_http_perl_module.c') diff --git a/src/http/modules/perl/ngx_http_perl_module.c b/src/http/modules/perl/ngx_http_perl_module.c index 3006a070c..b11320dad 100644 --- a/src/http/modules/perl/ngx_http_perl_module.c +++ b/src/http/modules/perl/ngx_http_perl_module.c @@ -459,6 +459,11 @@ ngx_http_perl_init_interpreter(ngx_conf_t *cf, ngx_http_perl_main_conf_t *pmcf) #if !(NGX_HAVE_PERL_MULTIPLICITY) if (perl) { + + if (ngx_set_environment(cf->cycle, NULL) == NULL) { + return NGX_CONF_ERROR; + } + if (ngx_http_perl_run_requires(aTHX_ &pmcf->requires, cf->log) != NGX_OK) { -- cgit v1.2.3