Index: trunk/pswarp/src/pswarpDefineSkycell.c
===================================================================
--- trunk/pswarp/src/pswarpDefineSkycell.c	(revision 27096)
+++ trunk/pswarp/src/pswarpDefineSkycell.c	(revision 35563)
@@ -73,15 +73,18 @@
     psFitsClose(fits);
 
-    // We need to force the format for the skycell to be equivalent to SIMPLE.  Determine
-    // the current format from the header; Determine camera if not specified already
-    // XXX EAM : this operation should be defined as a pmConfig function (pmConfigCopy?)
-    skyConfig = pmConfigAlloc();
-    skyConfig->user = psMemIncrRefCounter(config->user);
-    skyConfig->system = psMemIncrRefCounter(config->system);
+    { // this bit is unique to pswarpDefineSkycell:
 
-    psFree (skyConfig->files);
-    skyConfig->files = psMemIncrRefCounter(config->files);
-    psFree (skyConfig->arguments);
-    skyConfig->arguments = psMemIncrRefCounter(config->arguments);
+      // We need to force the format for the skycell to be equivalent to SIMPLE.  Determine
+      // the current format from the header; Determine camera if not specified already
+      // XXX EAM : this operation should be defined as a pmConfig function (pmConfigCopy?)
+      skyConfig = pmConfigAlloc();
+      skyConfig->user = psMemIncrRefCounter(config->user);
+      skyConfig->system = psMemIncrRefCounter(config->system);
+
+      psFree (skyConfig->files);
+      skyConfig->files = psMemIncrRefCounter(config->files);
+      psFree (skyConfig->arguments);
+      skyConfig->arguments = psMemIncrRefCounter(config->arguments);
+    }
 
     format = pmConfigCameraFormatFromHeader (NULL, NULL, NULL, skyConfig, phu, false);
@@ -94,6 +97,6 @@
 
     // Record the camera name of the skycell, so we can save its configuration
-    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "SKYCELL.CAMERA", 0, "Name of camera for skycell",
-                     skyConfig->cameraName);
+    // XXX this can be put outside of the f
+    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "SKYCELL.CAMERA", 0, "Name of camera for skycell", skyConfig->cameraName);
 
     // build the template fpa, set up the basic view
