- xpath.c: found a memleak and fixed a nasty bug
Daniel
diff --git a/xpath.c b/xpath.c
index 1287d5d..63903f0 100644
--- a/xpath.c
+++ b/xpath.c
@@ -931,7 +931,7 @@
     if (obj == NULL) return;
     for (i = 0;i < obj->nodeNr;i++)
         if (obj->nodeTab[i] != NULL)
-	    xmlFreeNode(obj->nodeTab[i]);
+	    xmlFreeNodeList(obj->nodeTab[i]);
 
     if (obj->nodeTab != NULL) {
 #ifdef DEBUG
@@ -2441,7 +2441,7 @@
 	    if (arg1->type == XPATH_NODESET) {
 		ret = xmlXPathCompareNodeSetValue(ctxt, inf, strict, arg1, arg2);
 	    } else {
-		ret = xmlXPathCompareNodeSetValue(ctxt, !inf, !strict, arg2, arg2);
+		ret = xmlXPathCompareNodeSetValue(ctxt, !inf, !strict, arg2, arg1);
 	    }
 	}
 	return(ret);