aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-07-17 08:04:52 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-07-17 08:04:52 +0000
commit142a9c3f1153dd9d5e7933662bea01563f62c0e4 (patch)
tree00b8ea70eab3f1a540068c5366f76b81de9d8aaf /src
parentc30d6da7db4f099935ba0b4f3927d853c24623e0 (diff)
downloadnginx-142a9c3f1153dd9d5e7933662bea01563f62c0e4.tar.gz
nginx-142a9c3f1153dd9d5e7933662bea01563f62c0e4.zip
preserve XML wellFormed field before freeing memory
Diffstat (limited to 'src')
-rw-r--r--src/http/modules/ngx_http_xslt_filter_module.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_xslt_filter_module.c b/src/http/modules/ngx_http_xslt_filter_module.c
index c43747b06..ca9e15dc6 100644
--- a/src/http/modules/ngx_http_xslt_filter_module.c
+++ b/src/http/modules/ngx_http_xslt_filter_module.c
@@ -247,6 +247,7 @@ ngx_http_xslt_header_filter(ngx_http_request_t *r)
static ngx_int_t
ngx_http_xslt_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
{
+ int wellFormed;
ngx_chain_t *cl;
ngx_http_xslt_filter_ctx_t *ctx;
@@ -288,9 +289,11 @@ ngx_http_xslt_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
ctx->doc->extSubset = NULL;
#endif
+ wellFormed = ctx->ctxt->wellFormed;
+
xmlFreeParserCtxt(ctx->ctxt);
- if (ctx->ctxt->wellFormed) {
+ if (wellFormed) {
return ngx_http_xslt_send(r, ctx,
ngx_http_xslt_apply_stylesheet(r, ctx));
}