Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0549de0

Browse files
committed
Fix segfault when xpath_list function is applied to an invalid document.
John Gray
1 parent 8462086 commit 0549de0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

contrib/xml2/xpath.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,10 @@ pgxml_result_to_text(xmlXPathObjectPtr res,
582582
text *xpres;
583583

584584
if (res == NULL)
585+
{
586+
xmlCleanupParser();
585587
return NULL;
588+
}
586589
switch (res->type)
587590
{
588591
case XPATH_NODESET:

0 commit comments

Comments
 (0)