fix apparent free-ordering issue reported in #7926
This commit is contained in:
parent
12c4a88db6
commit
96daa4036a
|
@ -770,16 +770,16 @@ static XMLSharedNodeList* find_impl(xmlXPathContext* ctxt, const string& xpath)
|
|||
xmlXPathObject* result = xmlXPathEval((const xmlChar*)xpath.c_str(), ctxt);
|
||||
|
||||
if (!result) {
|
||||
xmlXPathFreeContext(ctxt);
|
||||
xmlFreeDoc(ctxt->doc);
|
||||
xmlXPathFreeContext(ctxt);
|
||||
|
||||
throw XMLException("Invalid XPath: " + xpath);
|
||||
}
|
||||
|
||||
if (result->type != XPATH_NODESET) {
|
||||
xmlXPathFreeObject(result);
|
||||
xmlXPathFreeContext(ctxt);
|
||||
xmlFreeDoc(ctxt->doc);
|
||||
xmlXPathFreeContext(ctxt);
|
||||
|
||||
throw XMLException("Only nodeset result types are supported.");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user