Index: /trunk/psLib/test/types/tap_psMetadataConfigFormat.c
===================================================================
--- /trunk/psLib/test/types/tap_psMetadataConfigFormat.c	(revision 11666)
+++ /trunk/psLib/test/types/tap_psMetadataConfigFormat.c	(revision 11667)
@@ -18,5 +18,5 @@
 int main(void)
 {
-    plan_tests(13);
+    plan_tests(19);
 
     psMetadata *md = NULL;
@@ -27,8 +27,12 @@
     //Return NULL for NULL metadata input
     {
+        psMemId id = psMemGetId();
         out = psMetadataConfigFormat(md);
         ok( out == NULL,
             "psMetadataConfigFormat:         return NULL for NULL metadata input.");
+        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     }
+
+
     //Return NULL for empty metadata input
     {
@@ -38,4 +42,6 @@
             "psMetadataConfigFormat:         return NULL for empty metadata input.");
     }
+
+
     //Return NULL for metadata with missing hash table
     {
@@ -50,4 +56,6 @@
         md->hash = temp;
     }
+
+
     //Return NULL for metadata containing a psList
     {
@@ -60,6 +68,9 @@
         psFree(md);
     }
+
+
     //Return NULL for attempting to format vector with type = complex
     {
+        psMemId id = psMemGetId();
         psVector *vec = psVectorAlloc(60, PS_TYPE_C64);
         for (int i = 0; i < 5; i++)
@@ -74,8 +85,12 @@
             "Complex vector.");
         psFree(vec);
+        psFree(md);
+        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     }
+
+
     //Return NULL for attempting to format psTime with type = -1
     {
-        psFree(md);
+        psMemId id = psMemGetId();
         md = psMetadataAlloc();
         psTime *time = psTimeAlloc(PS_TIME_TT);
@@ -87,8 +102,12 @@
             "invalid time type.");
         psFree(time);
+        psFree(md);
+        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     }
+
+
     //Return valid metadata for attempting to format NULL psTime metadataItem
     {
-        psFree(md);
+        psMemId id = psMemGetId();
         md = psMetadataAlloc();
         psTime *time = psTimeAlloc(PS_TIME_TT);
@@ -108,8 +127,12 @@
         psFree(out);
         out = NULL;
+        psFree(md);
+        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     }
+
+
     //Return valid metadata for attempting to format NULL psTime metadataItem
     {
-        psFree(md);
+        psMemId id = psMemGetId();
         md = psMetadataAlloc();
         psMetadataAddS32(md, PS_LIST_HEAD, "new_S32", 0, NULL, 666);
@@ -125,8 +148,12 @@
         psFree(out);
         out = NULL;
+        psFree(md);
+        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     }
+
+
     //Return valid metadata for attempting to format NULL psTime metadataItem
     {
-        psFree(md);
+        psMemId id = psMemGetId();
         md = psMetadataAlloc();
         psMetadataAddS32(md, PS_LIST_HEAD, "f32", 0, "f32_1", 666);
@@ -147,4 +174,6 @@
         psFree(out);
         out = NULL;
+        psFree(md);
+        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     }
 
