--- ../libxml2-2.9.4/xmlschemas.c	2017-07-09 15:25:04.823441753 -0400
+++ xmlschemas.c	2017-07-10 15:44:42.994414774 -0400
@@ -3556,6 +3556,11 @@
     xmlFree(bucket);
 }
 
+static void
+xmlSchemaBucketDeallocator(xmlSchemaBucketPtr bucket, xmlChar * name) {
+    xmlSchemaBucketFree(bucket);
+};
+
 static xmlSchemaBucketPtr
 xmlSchemaBucketCreate(xmlSchemaParserCtxtPtr pctxt,
 			 int type, const xmlChar *targetNamespace)
@@ -4151,7 +4156,7 @@
 
     if (schema->schemasImports != NULL)
 	xmlHashFree(schema->schemasImports,
-		    (xmlHashDeallocator) xmlSchemaBucketFree);
+		    (xmlHashDeallocator) xmlSchemaBucketDeallocator);
     if (schema->includes != NULL) {
 	xmlSchemaItemListPtr list = (xmlSchemaItemListPtr) schema->includes;
 	int i;
