Index: /trunk/psLib/src/sysUtils/psHash.c
===================================================================
--- /trunk/psLib/src/sysUtils/psHash.c	(revision 1412)
+++ /trunk/psLib/src/sysUtils/psHash.c	(revision 1413)
@@ -11,6 +11,6 @@
 *  @author George Gusciora, MHPCC
 *
-*  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-08-07 00:06:06 $
+*  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-08-07 00:33:36 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -119,7 +119,4 @@
         return;
     }
-    // A bucket is actually a linked list of buckets.  We recursively step
-    // through that linked list, free each bucket.
-    psFree(bucket->next);
 
     psFree(bucket->key);
@@ -183,6 +180,8 @@
 
         // A bucket is composed of a linked list of buckets.
-        if (table->buckets[i] != NULL) {
-            psFree(table->buckets[i]);
+        while (table->buckets[i] != NULL) {
+            psHashBucket* bucket = table->buckets[i];
+            table->buckets[i] = bucket->next;
+            psFree(bucket);
         }
     }
@@ -263,5 +262,5 @@
             optr = ptr;
             while (ptr != NULL) {
-                // Dtermine if this entry holds the correct key.
+                // Determine if this entry holds the correct key.
                 if (strcmp(key, ptr->key) == 0) {
                     // The following lines of code are fairly standard ways
@@ -274,5 +273,4 @@
                         table->buckets[hash] = ptr->next;
                     }
-
                     psFree(ptr);
 
