Index: trunk/psLib/src/sys/psError.c
===================================================================
--- trunk/psLib/src/sys/psError.c	(revision 8576)
+++ trunk/psLib/src/sys/psError.c	(revision 8603)
@@ -10,6 +10,6 @@
  *  @author Eric Van Alst, MHPCC
  *
- *  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-08-24 23:52:14 $
+ *  @version $Revision: 1.34 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-08-25 22:04:03 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -86,6 +86,4 @@
     snprintf(msgName, MAX_STRING_LENGTH, "%s (%s:%d)", func, filename, lineno);
 
-    va_list argPtr;             // variable list arguement pointer
-
     if (new) {
         psErrorClear();
@@ -93,7 +91,9 @@
 
     // Get the variable list parameters to pass to logging function
+    va_list argPtr;             // variable list arguement pointer
     va_start(argPtr, format);
-
     vsnprintf(errMsg, MAX_STRING_LENGTH, format, argPtr);
+    va_end(argPtr);
+
     // Remove a single trailing \n from message -- it interferes with psErrorStackPrint
     int len = strlen(errMsg);
@@ -113,6 +113,4 @@
     #endif
 
-    // Clean up stack after variable argument has been used
-    va_end(argPtr);
 
     psFree(err);
