Skip to content
Permalink
Browse files Browse the repository at this point in the history
fix apparent free-ordering issue reported in #7926
  • Loading branch information
pauldavisthefirst committed Mar 11, 2020
1 parent 12c4a88 commit 96daa40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/pbd/xml++.cc
Expand Up @@ -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.");
}
Expand Down

0 comments on commit 96daa40

Please sign in to comment.