diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-01-09 17:40:40 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-01-09 17:40:40 +0000 |
commit | 0549de06ba85acf266f9f6f3719df1411e9d5cef (patch) | |
tree | e7cd6ec65c7cdb12e91b9b335101a2df32d792e3 /contrib/xml2/xpath.c | |
parent | 84620860d9c091213570a8f7c6178a415d51ed89 (diff) | |
download | postgresql-0549de06ba85acf266f9f6f3719df1411e9d5cef.tar.gz postgresql-0549de06ba85acf266f9f6f3719df1411e9d5cef.zip |
Fix segfault when xpath_list function is applied to an invalid document.
John Gray
Diffstat (limited to 'contrib/xml2/xpath.c')
-rw-r--r-- | contrib/xml2/xpath.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/xml2/xpath.c b/contrib/xml2/xpath.c index d3ac76b9ef5..c15a5bb6225 100644 --- a/contrib/xml2/xpath.c +++ b/contrib/xml2/xpath.c @@ -582,7 +582,10 @@ pgxml_result_to_text(xmlXPathObjectPtr res, text *xpres; if (res == NULL) + { + xmlCleanupParser(); return NULL; + } switch (res->type) { case XPATH_NODESET: |