Index: trunk/psModules/src/objects/pmSourceIO.c
===================================================================
--- trunk/psModules/src/objects/pmSourceIO.c	(revision 9067)
+++ trunk/psModules/src/objects/pmSourceIO.c	(revision 9387)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-09-30 02:29:59 $
+ *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-10-07 03:54:29 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -209,5 +209,14 @@
         // copy over the entries saved in the
         updates = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.HEADER");
-        psMetadataCopy (outhead, updates);
+        if (updates) {
+            psMetadataCopy (outhead, updates);
+            psFree (updates);
+        }
+
+        updates = psMetadataLookupPtr (&status, readout->analysis, "PSASTRO.HEADER");
+        if (updates) {
+            psMetadataCopy (outhead, updates);
+            psFree (updates);
+        }
 
         bool status = pmSourcesWriteCMP (sources, filename, outhead);
