IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7055


Ignore:
Timestamp:
May 3, 2006, 1:16:16 PM (20 years ago)
Author:
drobbin
Message:

Fixed memory leak and output errors associated with psImageSlice -> psVectorSort and p_psVectorSampleMedian.

Location:
trunk/psLib/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/imageops/psImagePixelExtract.c

    r6806 r7055  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2006-04-06 22:55:18 $
     10 *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2006-05-03 23:16:16 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    474474    if (direction == PS_CUT_X_POS || direction == PS_CUT_X_NEG) {
    475475        psVector* imgVec = psVectorAlloc(numRows, type);
     476        imgVec->n = imgVec->nalloc;
    476477        psVector* maskVec = NULL;
    477478        psMaskType* maskData = NULL;
     
    498499        if (mask != NULL) {
    499500            maskVec = psVectorAlloc(numRows, mask->type.type);
    500         }
    501         imgVec->n = imgVec->nalloc;
    502         maskVec->n = maskVec->nalloc;
     501            maskVec->n = maskVec->nalloc;
     502        }
    503503        #define PSIMAGE_CUT_VERTICAL(TYPE) \
    504504    case PS_TYPE_##TYPE: { \
  • trunk/psLib/src/math/psStats.c

    r6484 r7055  
    1616 * use ->min and ->max (PS_STAT_USE_RANGE)
    1717 *
    18  *  @version $Revision: 1.170 $ $Name: not supported by cvs2svn $
    19  *  @date $Date: 2006-02-24 23:43:15 $
     18 *  @version $Revision: 1.171 $ $Name: not supported by cvs2svn $
     19 *  @date $Date: 2006-05-03 23:16:16 $
    2020 *
    2121 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    617617                PS_ERRORTEXT_psStats_STATS_SAMPLE_MEDIAN_SORT_PROBLEM);
    618618        psTrace(__func__, 4, "---- %s(false) end ----\n", __func__);
     619        psFree(unsortedVector);
    619620        return(false);
    620621    }
  • trunk/psLib/src/mathtypes/psVector.c

    r7046 r7055  
    99*  @author Robert DeSonia, MHPCC
    1010*
    11 *  @version $Revision: 1.71 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2006-05-03 00:27:51 $
     11*  @version $Revision: 1.72 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2006-05-03 23:16:16 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    389389    long N = outVector->n;                    // Number of elements
    390390    if (N < 2) {
    391         psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    392                 "Error in psVectorSort:  Vector has less than 2 data entries!\n");
    393         psFree(outVector);
     391        //        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
     392        //                "Error in psVectorSort:  Vector has less than 2 data entries!\n");
     393        //        psFree(outVector);
    394394        //        psFree(outVector);
    395395        //        outVector = NULL;
    396         return NULL;
     396        return outVector;
    397397    }
    398398    long l = N >> 1;
Note: See TracChangeset for help on using the changeset viewer.