fixed problem with invalid char encountered during text include (reported

* xinclude.c: fixed problem with invalid char encountered during text include (reported on xslt mailing list)

svn path=/trunk/; revision=3583
diff --git a/ChangeLog b/ChangeLog
index 2b84bd2..015a0bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Feb 12 16:40:48 PST 2007 William Brack <wbrack@mmm.com.hk>
+
+	* xinclude.c: fixed problem with invalid char encountered
+	  during text include (reported on xslt mailing list)
+
 Mon Feb 12 18:30:01 CET 2007 Daniel Veillard <daniel@veillard.com>
 
 	* Makefile.am: small cleanup to avoid packaging .svn
diff --git a/xinclude.c b/xinclude.c
index 01e967e..34a5489 100644
--- a/xinclude.c
+++ b/xinclude.c
@@ -1889,6 +1889,9 @@
 		xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
 		               XML_XINCLUDE_INVALID_CHAR,
 			       "%s contains invalid char\n", URL);
+		xmlFreeParserInputBuffer(buf);
+		xmlFree(URL);
+		return(-1);
 	    } else {
 		xmlNodeAddContentLen(node, &content[i], l);
 	    }