IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 10475


Ignore:
Timestamp:
Dec 5, 2006, 10:05:57 AM (19 years ago)
Author:
Paul Price
Message:

Fixing memory leak when robust stats returns early due to error.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psStats.c

    r10395 r10475  
    1616 * use ->min and ->max (PS_STAT_USE_RANGE)
    1717 *
    18  *  @version $Revision: 1.192 $ $Name: not supported by cvs2svn $
    19  *  @date $Date: 2006-12-01 22:41:33 $
     18 *  @version $Revision: 1.193 $ $Name: not supported by cvs2svn $
     19 *  @date $Date: 2006-12-05 20:05:57 $
    2020 *
    2121 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    239239      costs only a small amount and is much easier to debug. running 10000 tests
    240240      of 1000 point vectors for the two methods gives:
    241                      separate    single 
     241                     separate    single
    242242(mask: 0, range: 0): 0.067 sec   0.073 sec
    243243(mask: 1, range: 0): 0.098 sec  0.102 sec
     
    314314      costs only a small amount and is much easier to debug. running 10000 tests
    315315      of 1000 point vectors for the two methods gives:
    316                      separate    single 
     316                     separate    single
    317317(mask: 0, range: 0):  0.101 sec  0.149 sec
    318318(mask: 1, range: 0):  0.125 sec  0.160 sec
     
    13001300            psFree(statsMinMax);
    13011301            psTrace("psLib.math", 4, "---- %s(false) end  ----\n", __func__);
     1302            psFree(mask);
    13021303            return false;
    13031304        }
     
    13181319
    13191320            psTrace("psLib.math", 4, "---- %s(0) end  ----\n", __func__);
     1321            psFree(mask);
    13201322            return false;
    13211323        }
     
    13751377                psFree(cumulative);
    13761378                psTrace("psLib.math", 4, "---- %s(false) end  ----\n", __func__);
     1379                psFree(mask);
    13771380                return false;
    13781381            }
     
    13911394            psFree(cumulative);
    13921395            psTrace("psLib.math", 4, "---- %s(false) end  ----\n", __func__);
     1396            psFree(mask);
    13931397            return false;
    13941398        }
     
    14261430            psFree(cumulative);
    14271431            psTrace("psLib.math", 4, "---- %s(false) end  ----\n", __func__);
     1432            psFree(mask);
    14281433            return false;
    14291434        }
     
    15441549        psFree(cumulative);
    15451550        psTrace("psLib.math", 4, "---- %s(false) end  ----\n", __func__);
     1551        psFree(mask);
    15461552        return false;
    15471553    }
     
    15611567        psFree(statsMinMax);
    15621568        psTrace("psLib.math", 4, "---- %s(1) end  ----\n", __func__);
     1569        psFree(mask);
    15631570        return false;
    15641571    }
Note: See TracChangeset for help on using the changeset viewer.