summaryrefslogtreecommitdiff
path: root/libs/pbd
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2020-03-11 08:49:42 -0600
committerPaul Davis <paul@linuxaudiosystems.com>2020-03-11 08:50:29 -0600
commit96daa4036a425ff3f23a7dfcba57bfb0f942bec6 (patch)
tree0ccedd8c94622ea60253094e96c29f67ebcd6b47 /libs/pbd
parent12c4a88db690b0eed3a308a36c8e9cda3db5cca3 (diff)
fix apparent free-ordering issue reported in #7926
Diffstat (limited to 'libs/pbd')
-rw-r--r--libs/pbd/xml++.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/pbd/xml++.cc b/libs/pbd/xml++.cc
index 598a7684b3..e09af7602b 100644
--- a/libs/pbd/xml++.cc
+++ b/libs/pbd/xml++.cc
@@ -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.");
}