IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13835


Ignore:
Timestamp:
Jun 14, 2007, 2:46:20 PM (19 years ago)
Author:
eugene
Message:

fix memory leaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotReadoutCleanup.c

    r13831 r13835  
    2020        psErrorClear();
    2121    }
    22     if (psErrorCodeLast() != PS_ERR_NONE) return false;
     22    if (psErrorCodeLast() != PS_ERR_NONE) {
     23        psFree (psf);
     24        psFree (sources);
     25        return false;
     26    }
    2327
    2428    // use the psf-model to measure FWHM stats
     
    2630        if (!psphotPSFstats (readout, recipe, psf)) {
    2731            psError(PSPHOT_ERR_PROG, false, "Failed to measure PSF shape parameters");
     32            psFree (psf);
     33            psFree (sources);
    2834            return false;
    2935        }
     
    3339        if (!psphotMomentsStats (readout, recipe, sources)) {
    3440            psError(PSPHOT_ERR_PROG, false, "Failed to measure Moment shape parameters");
     41            psFree (sources);
    3542            return false;
    3643        }
     
    5966    }
    6067
    61     // XXX move this to top of loop
     68    // XXX move this to top of loop?
    6269    pmKapaClose ();
    6370
Note: See TracChangeset for help on using the changeset viewer.