Index: /trunk/ppImage/src/ppImageParseCamera.c
===================================================================
--- /trunk/ppImage/src/ppImageParseCamera.c	(revision 13843)
+++ /trunk/ppImage/src/ppImageParseCamera.c	(revision 13844)
@@ -261,4 +261,13 @@
     output->fileLevel = PS_MIN (output->fileLevel, output->dataLevel);
 
+    // outMask and outWeight must be freed at the same level as output (all freed by pmFPAFreeData)
+    outMask->freeLevel   = output->freeLevel;
+    outWeight->freeLevel = output->freeLevel;
+    outMask->dataLevel   = output->dataLevel;
+    outWeight->dataLevel = output->dataLevel;
+
+    // the input data is the same as the output data : force the free levels to match
+    input->freeLevel = PS_MIN (output->freeLevel, input->freeLevel);
+
     // define the binned target files (which may just be carriers for some camera configurations)
     pmFPAfile *bin1 = pmFPAfileDefineFromFPA (config, byChip->fpa, options->xBin1, options->yBin1, "PPIMAGE.BIN1");
