Index: trunk/psLib/src/collections/psMetadata.c
===================================================================
--- trunk/psLib/src/collections/psMetadata.c	(revision 4094)
+++ trunk/psLib/src/collections/psMetadata.c	(revision 4308)
@@ -12,6 +12,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.64 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-06-03 02:07:51 $
+*  @version $Revision: 1.65 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-06-17 23:44:21 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -89,8 +89,8 @@
 
     psHashAdd(table, key, item); // put in the new entry
+    psMemDecrRefCounter(item); // get rid of extra reference
 
     // free local references of newly allocated items.
     psFree(newList);
-    psFree(item);
 
     return item;
@@ -107,6 +107,6 @@
     }
 
-    psFree(metadataItem->name);
-    psFree(metadataItem->comment);
+    psMemDecrRefCounter(metadataItem->name);
+    psMemDecrRefCounter(metadataItem->comment);
 
     if(!PS_META_IS_PRIMITIVE(type)) {
