parser: Don't overwrite error state in xmlParseTextDecl

If a memory allocation fails, this could cause a null deref after
recent changes.

Found by OSS-Fuzz.
diff --git a/parser.c b/parser.c
index 5e11caf..1554e3b 100644
--- a/parser.c
+++ b/parser.c
@@ -7131,6 +7131,8 @@
             if (c == '>')
                 break;
         }
+        if (ctxt->instate == XML_PARSER_EOF)
+            return;
     }
 
     ctxt->instate = oldstate;