IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 29339


Ignore:
Timestamp:
Oct 6, 2010, 11:48:21 AM (16 years ago)
Author:
eugene
Message:

plug memory leaks

Location:
tags/ipp-20100823
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-20100823/psLib/src/math/psMinimizeLMM.c

    r28998 r29339  
    325325        chisq += PS_SQR(delta) * dy->data.F32[i];
    326326
    327         if (isnan(dy->data.F32[i])) return NAN;
    328         if (isnan(delta)) return NAN;
    329         if (isnan(chisq)) return NAN;
     327        if (isnan(dy->data.F32[i])) goto escape;
     328        if (isnan(delta)) goto escape;
     329        if (isnan(chisq)) goto escape;
    330330
    331331        // we track alpha,beta and params,deriv separately
     
    354354    psFree(deriv);
    355355    return(chisq);
     356
     357escape:
     358    psFree(deriv);
     359    return NAN;
    356360}
    357361
     
    448452    if (isnan(min->value)) {
    449453        min->iter = min->maxIter;
     454        psFree(alpha);
     455        psFree(Alpha);
     456        psFree(beta);
     457        psFree(Beta);
     458        psFree(Params);
    450459        return(false);
    451460    }
  • tags/ipp-20100823/psphot/src/psphotSourceFits.c

    r29017 r29339  
    549549        // for the test fits, use a somewhat smaller radius
    550550        psphotSetRadiusFootprint(&model->fitRadius, readout, source, markVal, 0.5);
    551 
     551       
    552552        if (!psphotFitSersicIndexPCM (pcm, readout, source, fitOptions, maskVal, markVal, psfSize)) {
     553            psFree(pcm);
    553554            model->flags |= PM_MODEL_STATUS_BADARGS;
    554555            return model;
Note: See TracChangeset for help on using the changeset viewer.