diff options
author | Igor Sysoev <igor@sysoev.ru> | 2006-12-12 20:06:04 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2006-12-12 20:06:04 +0000 |
commit | d1985e91f5b7da6b7aa00686139f09c01b6f3a26 (patch) | |
tree | 1e7b4a87b310b64d8264daa7e760790cb12de624 /src/http/modules/perl/ngx_http_perl_module.c | |
parent | e8c5dc6ff4280cd1de8e4e6ffc1bf505ad857cf5 (diff) | |
download | nginx-d1985e91f5b7da6b7aa00686139f09c01b6f3a26.tar.gz nginx-d1985e91f5b7da6b7aa00686139f09c01b6f3a26.zip |
axe ngx_http_perl_cleanup_sv(): all SVs should be freed
by perl_free() in ngx_http_perl_cleanup_perl()
Diffstat (limited to 'src/http/modules/perl/ngx_http_perl_module.c')
-rw-r--r-- | src/http/modules/perl/ngx_http_perl_module.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/http/modules/perl/ngx_http_perl_module.c b/src/http/modules/perl/ngx_http_perl_module.c index e460550d7..1910a1bc9 100644 --- a/src/http/modules/perl/ngx_http_perl_module.c +++ b/src/http/modules/perl/ngx_http_perl_module.c @@ -62,7 +62,6 @@ static char *ngx_http_perl_require(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); static char *ngx_http_perl(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); static char *ngx_http_perl_set(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); -static void ngx_http_perl_cleanup_sv(void *data); #if (NGX_HAVE_PERL_MULTIPLICITY) static void ngx_http_perl_cleanup_perl(void *data); @@ -758,18 +757,6 @@ ngx_http_perl_cleanup_perl(void *data) #endif -static void -ngx_http_perl_cleanup_sv(void *data) -{ - ngx_http_perl_cleanup_t *cln = data; - - dTHXa(cln->perl); - PERL_SET_CONTEXT(cln->perl); - - SvREFCNT_dec(cln->sv); -} - - static ngx_int_t ngx_http_perl_preconfiguration(ngx_conf_t *cf) { @@ -860,8 +847,6 @@ ngx_http_perl(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) ngx_http_perl_loc_conf_t *plcf = conf; ngx_str_t *value; - ngx_pool_cleanup_t *cln; - ngx_http_perl_cleanup_t *pcln; ngx_http_core_loc_conf_t *clcf; ngx_http_perl_main_conf_t *pmcf; @@ -881,11 +866,6 @@ ngx_http_perl(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) } } - cln = ngx_pool_cleanup_add(cf->pool, sizeof(ngx_http_perl_cleanup_t)); - if (cln == NULL) { - return NGX_CONF_ERROR; - } - plcf->handler = value[1]; { @@ -907,11 +887,6 @@ ngx_http_perl(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) } - cln->handler = ngx_http_perl_cleanup_sv; - pcln = cln->data; - pcln->sv = plcf->sub; - pcln->perl = pmcf->perl; - clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module); clcf->handler = ngx_http_perl_handler; @@ -924,9 +899,7 @@ ngx_http_perl_set(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) { ngx_int_t index; ngx_str_t *value; - ngx_pool_cleanup_t *cln; ngx_http_variable_t *v; - ngx_http_perl_cleanup_t *pcln; ngx_http_perl_variable_t *pv; ngx_http_perl_main_conf_t *pmcf; @@ -964,11 +937,6 @@ ngx_http_perl_set(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) } } - cln = ngx_pool_cleanup_add(cf->pool, sizeof(ngx_http_perl_cleanup_t)); - if (cln == NULL) { - return NGX_CONF_ERROR; - } - pv->handler = value[2]; { @@ -990,11 +958,6 @@ ngx_http_perl_set(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) } - cln->handler = ngx_http_perl_cleanup_sv; - pcln = cln->data; - pcln->sv = pv->sub; - pcln->perl = pmcf->perl; - v->get_handler = ngx_http_perl_variable; v->data = (uintptr_t) pv; |