change suggested by Anthony Carrico when unregistering a namespace prefix
* xpath.c: change suggested by Anthony Carrico when unregistering
a namespace prefix to a context
* hash.c: be more careful about calling callbacks with NULL payloads.
Daniel
diff --git a/xpath.c b/xpath.c
index 6e7e471..627fa20 100644
--- a/xpath.c
+++ b/xpath.c
@@ -2974,6 +2974,9 @@
ctxt->nsHash = xmlHashCreate(10);
if (ctxt->nsHash == NULL)
return(-1);
+ if (ns_uri == NULL)
+ return(xmlHashRemoveEntry(ctxt->nsHash, ns_uri,
+ (xmlHashDeallocator)xmlFree));
return(xmlHashUpdateEntry(ctxt->nsHash, prefix, (void *) xmlStrdup(ns_uri),
(xmlHashDeallocator)xmlFree));
}