Index: trunk/psModules/src/camera/pmFPAfileDefine.c
===================================================================
--- trunk/psModules/src/camera/pmFPAfileDefine.c	(revision 11304)
+++ trunk/psModules/src/camera/pmFPAfileDefine.c	(revision 11332)
@@ -337,5 +337,6 @@
         return NULL;
     }
-    file->format = format;
+    psFree (format);
+    file->format = psMemIncrRefCounter(format);
 
     // adjust the rules to identify these files in the file->names data
@@ -480,4 +481,5 @@
     // set derived values
     file->fileLevel = input->fileLevel;
+    psFree (file->format);
     file->format = psMemIncrRefCounter(input->format);
 
@@ -618,4 +620,5 @@
         return NULL;
     }
+    psFree (file->format);
     file->format = format;
 
@@ -919,4 +922,5 @@
     file->xBin = xBin;
     file->yBin = yBin;
+    psFree (file->format);
     file->format = psMemIncrRefCounter(format);
 
@@ -958,4 +962,7 @@
         // The input camera has already been mosaicked to this level
         pmFPAfile *file = pmFPAfileDefineOutput(config, NULL, filename);
+        psFree (file->camera);
+        psFree (file->format);
+        psFree (file->fpa);
         file->camera = psMemIncrRefCounter(config->camera);
         file->format = psMemIncrRefCounter(config->format);
@@ -1008,4 +1015,5 @@
     file->src = src; // inherit output elements from this source pmFPA
     file->mosaicLevel = PM_FPA_LEVEL_CHIP; // don't do any I/O on this at a lower level
+    psFree (file->format);
     file->format = psMemIncrRefCounter(format);
 
@@ -1026,4 +1034,7 @@
         // The input camera has already been mosaicked to this level
         pmFPAfile *file = pmFPAfileDefineOutput(config, NULL, filename);
+        psFree (file->camera);
+        psFree (file->format);
+        psFree (file->fpa);
         file->camera = psMemIncrRefCounter(config->camera);
         file->format = psMemIncrRefCounter(config->format);
@@ -1085,4 +1096,5 @@
     file->src = src; // inherit output elements from this source pmFPA
     file->mosaicLevel = PM_FPA_LEVEL_FPA; // don't do any I/O on this at a lower level
+    psFree (file->format);
     file->format = psMemIncrRefCounter(format);
 
