IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 13, 2006, 2:53:56 PM (20 years ago)
Author:
magnier
Message:

fixed error in freeing updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmSourceIO.c

    r9387 r9560  
    33 *  @author EAM, IfA
    44 *
    5  *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2006-10-07 03:54:29 $
     5 *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2006-10-14 00:53:56 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    207207        outhead = psMetadataCopy (NULL, hdu->header);
    208208
    209         // copy over the entries saved in the
    210         updates = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.HEADER");
     209        // copy over the entries saved by PSPHOT
     210        updates = psMetadataLookupPtr (NULL, readout->analysis, "PSPHOT.HEADER");
    211211        if (updates) {
    212212            psMetadataCopy (outhead, updates);
    213             psFree (updates);
    214         }
    215 
    216         updates = psMetadataLookupPtr (&status, readout->analysis, "PSASTRO.HEADER");
     213        }
     214
     215        // copy over the entries saved by PSASTRO
     216        updates = psMetadataLookupPtr (NULL, readout->analysis, "PSASTRO.HEADER");
    217217        if (updates) {
    218218            psMetadataCopy (outhead, updates);
    219             psFree (updates);
    220219        }
    221220
     
    270269            // XXX : see note below about DVO/addstar expectations
    271270            updates = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.HEADER");
    272             psMetadataCopy (outhead, updates);
     271            if (updates) {
     272                psMetadataCopy (outhead, updates);
     273            }
     274
     275            updates = psMetadataLookupPtr (&status, readout->analysis, "PSASTRO.HEADER");
     276            if (updates) {
     277                psMetadataCopy (outhead, updates);
     278            }
    273279
    274280            psFitsWriteBlank (file->fits, outhead, headname);
Note: See TracChangeset for help on using the changeset viewer.