IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13688


Ignore:
Timestamp:
Jun 6, 2007, 2:36:33 PM (19 years ago)
Author:
Paul Price
Message:

Fixing double-free bug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStats/src/ppStatsLoop.c

    r13676 r13688  
    114114    if (!data->doStats && psListLength(data->summary)) {
    115115        // Nothing further to do --- don't want to waste our time reading the data
    116         if (psListLength(cellResults->list) > 0) {
    117             psMetadataAdd(chipResults, PS_LIST_TAIL, cellName, PS_DATA_METADATA,
    118                           "Results for cell", cellResults);
    119         }
    120116        goto cellDone;
    121117    }
     
    152148    if (data->sample <= 0.0) {
    153149        if (!psImageStats(data->stats, readout->image, readout->mask, data->maskVal)) {
    154             psLogMsg(__func__, PS_LOG_WARN, "Unable to perform statistics on cell %s --- ignored.\n", cellName);
     150            psWarning("Unable to perform statistics on cell %s --- ignored.\n", cellName);
    155151            goto statsDone;
    156152        }
     
    210206statsDone:
    211207    // count saturated pixels
    212     if (psListLength(data->summary) > 0)     {
     208    if (psListLength(data->summary) > 0) {
    213209        bool get_nSatPixels = false;
    214210        bool get_fSatPixels = false;
     
    316312        result = cellStats(chipResults, cell, fits, data, config);
    317313        if (result != PS_EXIT_SUCCESS) {
    318             psError (PS_ERR_IO, false, "trouble with cell stats for %d\n", view->cell);
    319             if (fits) {
    320                 pmChipFreeData(chip);
    321             }
    322             psFree(chipResults);
    323             return result;
     314            psError(PS_ERR_UNKNOWN, false, "trouble with cell stats for %d\n", view->cell);
    324315        }
    325316        addToHierarchy(chipResults, fpaResults, chipName, "Results for chip");
    326         psFree (chipResults);
     317        psFree (chipResults);
    327318        if (fits) {
    328319            pmChipFreeData(chip);
    329320        }
    330         return PS_EXIT_SUCCESS;
     321        return result;
    331322    }
    332323
     
    336327        result = cellStats(chipResults, cell, fits, data, config);
    337328        if (result != PS_EXIT_SUCCESS) {
    338             psError (PS_ERR_IO, false, "trouble with cell stats for %d\n", i);
     329            psError(PS_ERR_UNKNOWN, false, "trouble with cell stats for %d\n", i);
    339330            if (fits) {
    340331                pmChipFreeData(chip);
Note: See TracChangeset for help on using the changeset viewer.