IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 41912


Ignore:
Timestamp:
Nov 10, 2021, 3:50:26 PM (5 years ago)
Author:
eugene
Message:

plug leaks

Location:
tags/ipp-ps1-20211104/psModules/src/objects
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-ps1-20211104/psModules/src/objects/pmSourceIO.h

    r41382 r41912  
    9595bool pmSourceIO_WriteGhosts (psFits *fits, pmFPA *fpa, pmConfig *config);
    9696
     97void              pmSourceChipBoundsCleanup (void);
     98
    9799/// @}
    98100# endif /* PM_SOURCE_IO_H */
  • tags/ipp-ps1-20211104/psModules/src/objects/pmSourceIO_CMF.c.in

    r41892 r41912  
    485485    if (!psFitsWriteTableNew(fits, header, table, extname)) {
    486486        psError(psErrorCodeLast(), false, "writing ext data %s\n", extname);
     487        psFree(tableColumns);
    487488        psFree(table);
    488489        psFree(header);
    489490        return false;
    490491    }
     492    psFree(tableColumns);
    491493    psFree(table);
    492494    psFree(header);
  • tags/ipp-ps1-20211104/psModules/src/objects/pmSourceIO_Ghosts.c

    r41892 r41912  
    5757
    5858# include "pmSourceInternal.h"
    59 static psVector *chipXmin = NULL;
    60 static psVector *chipXmax = NULL;
    61 static psVector *chipYmin = NULL;
    62 static psVector *chipYmax = NULL;
    6359
    6460# define ESCAPE(MSG) { \
     
    243239
    244240                        //do a rudimentary check of whether the ghost is on the pixel FPA
    245                         if (abs(ghost->FP->y) > 21000.)  continue;
    246                         if (abs(ghost->FP->x) > 21000.)  continue;
     241                        if (abs(ghost->FP->y) > 21000.)  { psFree (ghost); continue; }
     242                        if (abs(ghost->FP->x) > 21000.)  { psFree (ghost); continue; }
    247243
    248244                        //save the ghost positions
     
    267263                            psArrayAdd (table, 100, row);
    268264                            psFree (row);
    269                                                
    270                         }
    271                         else {
     265                        } else {
    272266                            psMetadata *row = psMetadataAlloc ();
    273267                            psMetadataAdd (row, PS_LIST_TAIL, "X_STAR_FPA",     PS_DATA_F32,    "x coord on focal plane",         ref->FP->x);
     
    290284                            psFree (row);
    291285                        }                 
    292                                                
     286                        psFree (ghost);
    293287                    }
    294288                }
     
    366360}
    367361
     362static psVector *chipXmin = NULL;
     363static psVector *chipXmax = NULL;
     364static psVector *chipYmin = NULL;
     365static psVector *chipYmax = NULL;
     366
     367void pmSourceChipBoundsCleanup (void) {
     368    psFree (chipXmin);
     369    psFree (chipXmax);
     370    psFree (chipYmin);
     371    psFree (chipYmax);
     372}
    368373
    369374bool pmSourceChipBounds (pmFPA *fpa) {
  • tags/ipp-ps1-20211104/psModules/src/objects/pmSourceInternal.h

    r41394 r41912  
    5555bool              pmSourceExtractFreeChipBounds(void);
    5656
    57 
    5857#endif
Note: See TracChangeset for help on using the changeset viewer.