Index: trunk/psLib/test/sys/tst_psString.c
===================================================================
--- trunk/psLib/test/sys/tst_psString.c	(revision 6278)
+++ trunk/psLib/test/sys/tst_psString.c	(revision 6989)
@@ -20,6 +20,6 @@
  *  @author  Eric Van Alst, MHPCC
  *
- *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2006-02-01 20:40:56 $
+ *  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
+ *  @date  $Date: 2006-04-26 02:19:23 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -456,22 +456,31 @@
     psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
     strList = psStringSplit(NULL, NULL);
-    if (strList != NULL) {
+    //    if (strList != NULL) {
+    if ( psListLength(strList) ) {
         psFree(strList);
         return 1;
     }
+    psFree(strList);
+    strList = NULL;
     //Return NULL for NULL string input
     psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
     strList = psStringSplit(NULL, split);
-    if (strList != NULL) {
+    //    if (strList != NULL) {
+    if ( psListLength(strList) ) {
         psFree(strList);
         return 2;
     }
+    psFree(strList);
+    strList = NULL;
     //Return NULL for NULL splitter input
     psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
     strList = psStringSplit(str, NULL);
-    if (strList != NULL) {
+    //    if (strList != NULL) {
+    if ( psListLength(strList) ) {
         psFree(strList);
         return 3;
     }
+    psFree(strList);
+    strList = NULL;
     //Return a psList* of psStrings
     strList = psStringSplit(str, split);
@@ -679,19 +688,24 @@
     psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
     nullList = psStringSplit(nullTest, ",");
-    if (nullList != NULL) {
+    //    if (nullList != NULL) {
+    if ( psListLength(nullList) ) {
         psError(PS_ERR_BAD_PARAMETER_NULL, false,
                 "psStringSplit failed to return NULL for NULL input string.\n");
         return 5;
     }
+    psFree(nullList);
+    nullList = NULL;
     //psStringSplit should return NULL for NULL input splitter
     psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
     nullList = psStringSplit("Hello World", nullTest);
-    if (nullList != NULL) {
+    //    if (nullList != NULL) {
+    if ( psListLength(nullList) ) {
         psError(PS_ERR_BAD_PARAMETER_NULL, false,
                 "psStringSplit failed to return NULL for NULL input splitter.\n");
         return 6;
     }
-
-    return 0;
-}
-
+    psFree(nullList);
+
+    return 0;
+}
+
