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)