aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/perl/ngx_http_perl_module.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-04-18 11:28:11 +0000
committerIgor Sysoev <igor@sysoev.ru>2007-04-18 11:28:11 +0000
commite5e4c0000d1fa5a387c32bba0fd4fcad53fd3e9f (patch)
tree9cb425afe515d6a3b5b1d8bf79fe26970ffce2c5 /src/http/modules/perl/ngx_http_perl_module.c
parent5dbc83df060fb4593a4e1f1006ed999858b26c0c (diff)
downloadnginx-e5e4c0000d1fa5a387c32bba0fd4fcad53fd3e9f.tar.gz
nginx-e5e4c0000d1fa5a387c32bba0fd4fcad53fd3e9f.zip
fix segfault when
*) perl was built without multiplicity *) when configuration was invalid
Diffstat (limited to 'src/http/modules/perl/ngx_http_perl_module.c')
-rw-r--r--src/http/modules/perl/ngx_http_perl_module.c5
1 files changed, 5 insertions, 0 deletions
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)
{