small fix to avoid potential problem due to ordering of freeing data

* xpath.c: small fix to avoid potential problem due to
  ordering of freeing data
* python/Makefile.am: people were complaining about
  the generated file in python dir not being built
Daniel
diff --git a/ChangeLog b/ChangeLog
index be5e3be..a4c7d0b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sat Mar 16 23:01:42 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+	* xpath.c: small fix to avoid potential problem due to
+	  ordering of freeing data
+	* python/Makefile.am: people were complaining about 
+	  the generated file in python dir not being built
+
 Fri Mar 15 23:21:40 CET 2002 Daniel Veillard <daniel@veillard.com>
 
 	* libxml.spec.in python/Makefile.am python/tests/Makefile.am
diff --git a/python/Makefile.am b/python/Makefile.am
index 1a188cb..e0cd052 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -56,7 +56,7 @@
 $(GENERATED): $(srcdir)/$(GENERATE) $(API_DESC)
 	cd $(srcdir) && $(PYTHON) $(GENERATE)
 
-$(libxmlmodule_la_OBJECTS): $(GENERATED)
+$(libxml2mod_la_OBJECTS): $(GENERATED)
 else
 all: 
 endif
diff --git a/xpath.c b/xpath.c
index 1f57544..032c9b1 100644
--- a/xpath.c
+++ b/xpath.c
@@ -3071,8 +3071,8 @@
     if ((obj->type == XPATH_NODESET) || (obj->type == XPATH_XSLT_TREE)) {
 	if (obj->boolval) {
 	    if (obj->user != NULL) {
-		xmlFreeNodeList((xmlNodePtr) obj->user);
                 xmlXPathFreeNodeSet(obj->nodesetval);
+		xmlFreeNodeList((xmlNodePtr) obj->user);
 	    } else if (obj->nodesetval != NULL)
 		xmlXPathFreeValueTree(obj->nodesetval);
 	} else {