applied patch from Ashwin to avoid a potential double-free Daniel

* parserInternals.c: applied patch from Ashwin to avoid a potential
  double-free
Daniel

svn path=/trunk/; revision=3741
diff --git a/ChangeLog b/ChangeLog
index 41c403e..7e6a7fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Apr 28 20:06:12 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+	* parserInternals.c: applied patch from Ashwin to avoid a potential
+	  double-free
+
 Thu Apr 24 13:56:53 CEST 2008 Daniel Veillard <daniel@veillard.com>
 
 	* uri.c: applied patch from Ashwin fixing a number of realloc problems
diff --git a/parserInternals.c b/parserInternals.c
index d7aa4cf..c14bb78 100644
--- a/parserInternals.c
+++ b/parserInternals.c
@@ -1399,7 +1399,8 @@
     if (input == NULL) {
 	return(NULL);
     }
-    input->filename = (char *) entity->URI;
+    if (entity->URI != NULL)
+	input->filename = (char *) xmlStrdup((xmlChar *) entity->URI);
     input->base = entity->content;
     input->cur = entity->content;
     input->length = entity->length;