Index: /trunk/psLib/src/types/psMetadataConfig.c
===================================================================
--- /trunk/psLib/src/types/psMetadataConfig.c	(revision 9859)
+++ /trunk/psLib/src/types/psMetadataConfig.c	(revision 9860)
@@ -10,6 +10,6 @@
 *  @author Eric Van Alst, MHPCC
 *
-*  @version $Revision: 1.106 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2006-11-04 00:20:09 $
+*  @version $Revision: 1.107 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2006-11-04 03:15:43 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -1259,5 +1259,14 @@
     md = psMetadataConfigParse(md, nFail, (char *)file, overwrite);
 
-    munmap(file, (size_t)buf.st_size);
+    if (munmap(file, (size_t)buf.st_size) != 0) {
+        psError(PS_ERR_IO, true, _("failed to munmap file '%s'"), filename);
+        if (close(fd) != 0) {
+            // the new error flag is set to false so as not to hide the
+            // munmap() error
+            psError(PS_ERR_IO, false, _("Failed to close file '%s'."), filename);
+            return NULL;
+        }
+    }
+
     /*
     if (close(fd) != 0) {
