comparison src/http/modules/perl/ngx_http_perl_module.c @ 2714:4dd1773990db

fix segfault on exit if no http section is defined in confguraiton, the bug has been introduced in r1947
author Igor Sysoev <igor@sysoev.ru>
date Wed, 15 Apr 2009 20:28:36 +0000
parents b4d8aef4a1ad
children a5845475a903
comparison
equal deleted inserted replaced
2713:b4d8aef4a1ad 2714:4dd1773990db
1059 { 1059 {
1060 ngx_http_perl_main_conf_t *pmcf; 1060 ngx_http_perl_main_conf_t *pmcf;
1061 1061
1062 pmcf = ngx_http_cycle_get_module_main_conf(cycle, ngx_http_perl_module); 1062 pmcf = ngx_http_cycle_get_module_main_conf(cycle, ngx_http_perl_module);
1063 1063
1064 { 1064 if (pmcf) {
1065 1065 dTHXa(pmcf->perl);
1066 dTHXa(pmcf->perl); 1066 PERL_SET_CONTEXT(pmcf->perl);
1067 PERL_SET_CONTEXT(pmcf->perl); 1067
1068 1068 PERL_SYS_TERM();
1069 PERL_SYS_TERM(); 1069 }
1070 1070 }
1071 }
1072 }