IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 7, 2022, 11:02:54 AM (4 years ago)
Author:
eugene
Message:

fix typo, plug leaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20211108/psphot/src/psphotFindPeaks.c

    r41968 r42021  
    4141            // psVectorStats will only fail due to a programming error (e.g., invalid vector type)
    4242            psError(PSPHOT_ERR_UNKNOWN, false, "Unable to perform statistics to measure image quality");
     43            psFree (SNvalues);
    4344            return NULL;
    4445        }
     46        psFree (SNvalues);
     47
    4548        if (!isfinite(stats->sampleMedian)) {
    4649            // could not determine relationship between SN threshold and image values
    4750            // XXX fall-back could be the standard analysis above.
    4851            psLogMsg ("psphot", PS_LOG_INFO, "failure to map SN to image values");
     52            psFree (stats);
    4953            goto use_significance;
    5054        }
    5155       
    5256        float alt_threshold = stats->sampleMedian;
     57        psFree (stats);
     58
    5359        peaks = pmPeaksInImage (significance->image, alt_threshold);
    5460        if (peaks == NULL) {
Note: See TracChangeset for help on using the changeset viewer.