IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42784


Ignore:
Timestamp:
Jan 21, 2025, 11:05:15 AM (16 months ago)
Author:
tdeboer
Message:

ppMerge memory leak, camera changes

Location:
trunk/psModules/src/camera
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPA.c

    r26893 r42784  
    5353    }
    5454    psTrace("psModules.camera", 9, "Freeing cell %zd\n", (size_t)cell);
     55
    5556    pmCellFreeReadouts(cell);
    5657    psFree(cell->readouts);
    57 
    5858    psFree(cell->concepts);
    5959    psFree(cell->analysis);
     
    166166    psFree(readout->variance);
    167167    psFree(readout->covariance);
     168    psFree(readout->analysis);
    168169    psFree(readout->bias);
    169170
     
    173174    readout->variance = NULL;
    174175    readout->covariance = NULL;
     176    readout->analysis = NULL;
    175177    readout->mask = NULL;
    176 
    177     readout->bias = psListAlloc(NULL);
     178    readout->bias = NULL;
    178179
    179180    readout->col0 = 0;
  • trunk/psModules/src/camera/pmFPAConstruct.c

    r41892 r42784  
    5252
    5353// Parse a list of first:second:third pairs in a string
     54// EAM : this function takes an input 'string' and attempts to parse out
     55// groups of the form FIRST:SECOND:THIRD into the arrays (first, second, third).
     56
     57// The input string may have multiple entries of this form separated by spaces, commas, or
     58// semi-colons.  The number of arrays which are supplied must match the string format or
     59// an error will be raised.
     60
     61// e.g., the string could be CHIP:CELL:TYPE in which case all three arrays must exist
     62// or, the string could be CHIP:CELL only, in which case the array 'third' must be NULL
     63 
    5464static int parseContent(psArray **first, // Array of the first values
    5565                         psArray **second, // Array of the second values
     
    8393    while ((value = psListGetAndIncrement(valuesIter))) {
    8494        psArray *fst = psStringSplitArray(value, ":", true); // First, second, third
     95        if (fst->n != numArrays) {
     96          psError(PS_ERR_BAD_PARAMETER_VALUE, false, "string %s does not match expected format (%ld colon-separated items supplied, %d expected)", value, fst->n, numArrays);
     97          return 0;
     98        }
    8599        switch (numArrays) {
    86100          case 3:
     
    11261140    pmFPAview *view = pmFPAviewAlloc(0); // View, to be returned
    11271141    if (phuView) {
    1128         // Copy the view, for the case where we're given a view.
     1142        // Copy the view values, for the case where we're given a view.
    11291143        *view = *phuView;
    11301144    }
Note: See TracChangeset for help on using the changeset viewer.