diff --git a/xmlIO.c b/xmlIO.c
index d1544f3..23b5362 100644
--- a/xmlIO.c
+++ b/xmlIO.c
@@ -920,8 +920,6 @@ xmlFileOpen_real (const char *filename) {
     } else
 	path = filename;
 
-    if (path == NULL)
-	return(NULL);
     if (!xmlCheckFilename(path))
         return(NULL);
 
diff --git a/xmlmemory.c b/xmlmemory.c
index 37dcf3b..05084e3 100644
--- a/xmlmemory.c
+++ b/xmlmemory.c
@@ -512,10 +512,7 @@ xmlMemStrdupLoc(const char *str, const char *file, int line)
 
     if (xmlMemStopAtBlock == p->mh_number) xmlMallocBreakpoint();
 
-    if (s != NULL)
-      strcpy(s,str);
-    else
-      goto error;
+    strcpy(s,str);
 
     TEST_POINT
 
