IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9986


Ignore:
Timestamp:
Nov 14, 2006, 3:11:21 PM (20 years ago)
Author:
Paul Price
Message:

Plugging memory leaks --- forgotten free in pmMaskIdentifyBadPixels, and was clobbering existing array in generateHDU.

Location:
trunk/psModules/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmHDUGenerate.c

    r9983 r9986  
    303303    int numReadouts = -1;               // Number of readouts
    304304    psElemType imageType = 0;           // Type of readout images
    305     psElemType maskType = 0;   // Type of readout masks
     305    psElemType maskType = 0;            // Type of readout masks
    306306    psElemType weightType = 0;          // Type of readout weights
    307307    {
     
    324324                }
    325325
    326                 if (readout->image) {
     326                if (!hdu->images && readout->image) {
    327327                    imageType = checkTypes(imageType, readout->image->type.type);
    328328                }
    329                 if (readout->mask) {
     329                if (!hdu->masks && readout->mask) {
    330330                    maskType = checkTypes(maskType, readout->mask->type.type);
    331331                }
    332                 if (readout->weight) {
     332                if (!hdu->weights && readout->weight) {
    333333                    weightType = checkTypes(weightType, readout->weight->type.type);
    334334                }
  • trunk/psModules/src/detrend/pmMaskBadPixels.c

    r9981 r9986  
    148148    float mean = stats->sampleMean;     // Mean value
    149149    float stdev = stats->sampleStdev;   // Standard deviation
     150    psFree(stats);
    150151
    151152    psImage *badpix = psImageAlloc(suspects->numCols, suspects->numRows, PS_TYPE_MASK); // Bad pixel mask
Note: See TracChangeset for help on using the changeset viewer.