Index: /branches/rel10_ifa/psModules/src/astrom/pmFPAConstruct.c
===================================================================
--- /branches/rel10_ifa/psModules/src/astrom/pmFPAConstruct.c	(revision 6812)
+++ /branches/rel10_ifa/psModules/src/astrom/pmFPAConstruct.c	(revision 6813)
@@ -207,4 +207,6 @@
         }
     }
+    psFree(keywordsIter);
+    psFree(keywords);
     psTrace(__func__, 5, "Looking up %s in the CONTENTS.\n", contentsKey);
     const char *content = psMetadataLookupStr(&mdok, contents, contentsKey);
@@ -444,5 +446,5 @@
 
         // Need to look up what chip we have.
-        const char *chipName = phuNameFromHeader("CHIP.NAME", formatSpec, phu);
+        psString chipName = phuNameFromHeader("CHIP.NAME", formatSpec, phu);
         psTrace(__func__, 5, "This is chip %s\n", chipName);
         int chipNum = pmFPAFindChip(fpa, chipName); // Chip number
@@ -463,5 +465,5 @@
             level = PM_FPA_LEVEL_CELL;
             // Need to look up what cell we have.
-            const char *cellName = phuNameFromHeader("CELL.NAME", formatSpec, phu);
+            psString cellName = phuNameFromHeader("CELL.NAME", formatSpec, phu);
             int cellNum = pmChipFindCell(chip, cellName); // Cell number
             if (cellNum == -1) {
@@ -472,4 +474,5 @@
             cell = chip->cells->data[cellNum];
             view->cell = cellNum;
+            psFree(cellName);
         } else {
             psError(PS_ERR_IO, true, "PHU is not FPA, CHIP or CELL.\n");
@@ -477,4 +480,5 @@
             return NULL;
         }
+        psFree(chipName);
 
         processContents(fpa, chip, cell, phdu, level, content, format);
@@ -493,5 +497,5 @@
     } else {
         // Get the chip
-        const char *chipName = phuNameFromHeader("CHIP.NAME", formatSpec, phu); // Name of the chip
+        psString chipName = phuNameFromHeader("CHIP.NAME", formatSpec, phu); // Name of the chip
         int chipNum = pmFPAFindChip(fpa, chipName); // Chip number
         if (chipNum == -1) {
@@ -506,5 +510,5 @@
             addHDUtoChip(chip, phdu);
         } else if (strcasecmp(phuType, "CELL") == 0) {
-            const char *cellName = phuNameFromHeader("CELL.NAME", formatSpec, phu); // Name of the cell
+            psString cellName = phuNameFromHeader("CELL.NAME", formatSpec, phu); // Name of the cell
             int cellNum = pmChipFindCell(chip, cellName); // Cell number
             if (cellNum == -1) {
@@ -515,4 +519,5 @@
             cell = chip->cells->data[cellNum]; // The specified cell
             view->cell = cellNum;
+            psFree(cellName);
 
             addHDUtoCell(cell, phdu);
@@ -522,4 +527,5 @@
             return NULL;
         }
+        psFree(chipName);
     }
     psFree(phdu);
