IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 18, 2010, 1:04:34 PM (16 years ago)
Author:
Paul Price
Message:

Plugging memory leak when not fitting chi2 flux trend.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmPSFtryModel.c

    r26260 r27330  
    7878    }
    7979
    80     // this is a bit tricky, because we have two cases (MAP vs POLY), and they have a different 
    81     // definition for 'order' (order_MAP = order_POLY + 1).  in addition, we have a 
     80    // this is a bit tricky, because we have two cases (MAP vs POLY), and they have a different
     81    // definition for 'order' (order_MAP = order_POLY + 1).  in addition, we have a
    8282    // user-specified MAX order, which we should respect, regardless of the mode
    8383
     
    9393    int orderMin = 0;
    9494    if (options->psfTrendMode == PM_TREND_MAP) {
    95         MaxOrderForStars ++;
    96         orderMin ++;
     95        MaxOrderForStars ++;
     96        orderMin ++;
    9797    }
    9898    orderMax = PS_MIN (orderMax, MaxOrderForStars);
     
    204204                  psStatsGetValue(stats, meanStat), psStatsGetValue(stats, stdevStat));
    205205
    206         psFree(flux);
    207         psFree(mask);
    208         psFree(chisq);
    209 
    210206        if (!result) {
    211207            psError(PS_ERR_UNKNOWN, false, "Failed to fit psf->ChiTrend");
    212208            psFree(psfTry);
    213             return NULL;
    214         }
    215     }
     209            psFree(flux);
     210            psFree(mask);
     211            psFree(chisq);
     212            return NULL;
     213        }
     214    }
     215
     216    psFree(flux);
     217    psFree(mask);
     218    psFree(chisq);
    216219
    217220    for (int i = 0; i < psfTry->psf->ChiTrend->nX + 1; i++) {
Note: See TracChangeset for help on using the changeset viewer.