Index: /trunk/psLib/src/types/psMetadataConfig.c
===================================================================
--- /trunk/psLib/src/types/psMetadataConfig.c	(revision 9918)
+++ /trunk/psLib/src/types/psMetadataConfig.c	(revision 9919)
@@ -10,6 +10,6 @@
 *  @author Eric Van Alst, MHPCC
 *
-*  @version $Revision: 1.115 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2006-11-09 03:22:38 $
+*  @version $Revision: 1.116 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2006-11-09 03:50:08 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -1407,4 +1407,22 @@
     }
 
+    // split the input string into an array of lines
+    psList *doc = psStringSplit(str, "\n", true);
+    if (!doc) {
+        psError(PS_ERR_UNKNOWN, false, "failed to split string: %s", str);
+        if (allocedMD) {
+            psFree(md);
+        }
+        return NULL;
+    }
+    if (psListLength(doc) == 0) {
+        psError(PS_ERR_UNKNOWN, false, "string contained no lines");
+        psFree(doc);
+        if (allocedMD) {
+            psFree(md);
+        }
+        return NULL;
+    }
+
     // Allocate array to store parse level information
     psArray *parseLevelInfoArray = psArrayAllocEmpty(INITIAL_LENGTH);
@@ -1415,23 +1433,4 @@
     psArrayAdd(parseLevelInfoArray, 0, topLevelInfo);
     psFree(topLevelInfo);
-
-    psList *doc = psStringSplit(str, "\n", true);
-    if (!doc) {
-        psError(PS_ERR_UNKNOWN, false, "failed to split string: %s", str);
-        psFree(parseLevelInfoArray);
-        if (allocedMD) {
-            psFree(md);
-        }
-        return NULL;
-    }
-    if (psListLength(doc) == 0) {
-        psError(PS_ERR_UNKNOWN, false, "string contained no lines");
-        psFree(doc);
-        psFree(parseLevelInfoArray);
-        if (allocedMD) {
-            psFree(md);
-        }
-        return NULL;
-    }
 
     // clear the error stack so we can call psError(..., false, ...) and let
