commit | 2f3523f61f1c7a2a0521c2f6c0db6c80e1cc4111 | [log] [tgz] |
---|---|---|
author | Daniel Veillard <veillard@redhat.com> | Fri Oct 15 18:30:29 2010 +0200 |
committer | Daniel Veillard <veillard@redhat.com> | Fri Oct 15 18:30:29 2010 +0200 |
tree | a129274086bcb3229e4d397b77e1d01121f78141 | |
parent | 91d19754d46acd4a639a8b9e31f50f31c78f8c9c [diff] |
Fix a leak in XPath compilation Sometimes a not well formed XPath expression could lead to a leak as reported by Ralf Junker <ralfjunker@gmx.de>
diff --git a/xpath.c b/xpath.c index 8b77af3..9d47618 100644 --- a/xpath.c +++ b/xpath.c
@@ -11261,7 +11261,10 @@ } } - CHECK_ERROR; + if (ctxt->error != XPATH_EXPRESSION_OK) { + xmlFree(name); + return; + } name = xmlXPathCompNodeTest(ctxt, &test, &type, &prefix, name); if (test == 0)