IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23667


Ignore:
Timestamp:
Apr 1, 2009, 4:47:58 PM (17 years ago)
Author:
eugene
Message:

plug mem leaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastroExtractFindChip.c

    r23591 r23667  
    9393        psPlaneTransformApply (&ptCH, chip->fromFPA, &ptFP);
    9494
    95         if (ptCH.x <  region->x0) continue;
    96         if (ptCH.x >= region->x1) continue;
    97         if (ptCH.y <  region->y0) continue;
    98         if (ptCH.y >= region->y1) continue;
     95        if (ptCH.x <  region->x0) goto next_chip;
     96        if (ptCH.x >= region->x1) goto next_chip;
     97        if (ptCH.y <  region->y0) goto next_chip;
     98        if (ptCH.y >= region->y1) goto next_chip;
     99        psFree (region);
    99100
    100101        *xChip = ptCH.x;
    101102        *yChip = ptCH.y;
    102103        return chip;
     104
     105    next_chip:
     106        psFree (region);
    103107    }
    104108
    105109    return NULL;
    106110}
     111
     112bool psastroExtractFreeChipBounds () {
     113 
     114  psFree (chipXmin);
     115  psFree (chipXmax);
     116  psFree (chipYmin);
     117  psFree (chipYmax);
     118  return true;
     119}
Note: See TracChangeset for help on using the changeset viewer.