Index: /trunk/ppImage/src/ppImageDetrendRecord.c
===================================================================
--- /trunk/ppImage/src/ppImageDetrendRecord.c	(revision 20772)
+++ /trunk/ppImage/src/ppImageDetrendRecord.c	(revision 20773)
@@ -66,4 +66,5 @@
     psMetadata *detrend = psMetadataAlloc(); // Detrend information
     psMetadataAddMetadata(cell->analysis, PS_LIST_TAIL, "DETREND", 0, "Detrend information", detrend);
+
     detrendRecord(options->doMask, detrend, config, view, "PPIMAGE.MASK", "DETREND.MASK", "Mask filename");
     detrendRecord(options->doBias, detrend, config, view, "PPIMAGE.BIAS", "DETREND.BIAS", "Bias filename");
@@ -74,4 +75,6 @@
     detrendRecord(options->doFringe, detrend, config, view, "PPIMAGE.FRINGE", "DETREND.FRINGE",
                   "Fringe filename");
+
+    psFree (detrend);
     return true;
 }
