diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2010-03-01 05:16:35 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2010-03-01 05:16:35 +0000 |
commit | a102090995858cdd324b1afe81f2f7735ef7f3a1 (patch) | |
tree | 685560e1b9088e6eff0475326ca01d4f0f4c9d7b /contrib/xml2/xslt_proc.c | |
parent | 73632828aca2d252b4ea14706da6d2514c2750f1 (diff) | |
download | postgresql-a102090995858cdd324b1afe81f2f7735ef7f3a1.tar.gz postgresql-a102090995858cdd324b1afe81f2f7735ef7f3a1.zip |
Remove xmlCleanupParser calls from contrib/xml2.
These are unnecessary and probably dangerous. I don't see any immediate
risk situations in the core XML support or contrib/xml2 itself, but there
could be issues with external uses of libxml2, and in any case it's an
accident waiting to happen.
Diffstat (limited to 'contrib/xml2/xslt_proc.c')
-rw-r--r-- | contrib/xml2/xslt_proc.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/contrib/xml2/xslt_proc.c b/contrib/xml2/xslt_proc.c index ddf90f9c716..4265a561164 100644 --- a/contrib/xml2/xslt_proc.c +++ b/contrib/xml2/xslt_proc.c @@ -1,5 +1,5 @@ /* - * $PostgreSQL: pgsql/contrib/xml2/xslt_proc.c,v 1.17 2010/02/28 19:51:37 tgl Exp $ + * $PostgreSQL: pgsql/contrib/xml2/xslt_proc.c,v 1.18 2010/03/01 05:16:35 tgl Exp $ * * XSLT processing functions (requiring libxslt) * @@ -79,7 +79,6 @@ xslt_process(PG_FUNCTION_ARGS) if (doctree == NULL) { - xmlCleanupParser(); elog_error("error parsing XML document", false); PG_RETURN_NULL(); @@ -93,7 +92,6 @@ xslt_process(PG_FUNCTION_ARGS) if (ssdoc == NULL) { xmlFreeDoc(doctree); - xmlCleanupParser(); elog_error("error parsing stylesheet as XML document", false); PG_RETURN_NULL(); } @@ -108,7 +106,6 @@ xslt_process(PG_FUNCTION_ARGS) { xmlFreeDoc(doctree); xsltCleanupGlobals(); - xmlCleanupParser(); elog_error("failed to parse stylesheet", false); PG_RETURN_NULL(); } @@ -121,7 +118,6 @@ xslt_process(PG_FUNCTION_ARGS) xmlFreeDoc(doctree); xsltCleanupGlobals(); - xmlCleanupParser(); if (resstat < 0) PG_RETURN_NULL(); |