Fix some memory leaks (Patch provided by Brian Taylor)
This commit is contained in:
parent
4864f0a118
commit
c11613d1f7
|
|
@ -39,6 +39,9 @@ TWOdestroy(TWOdevice *pDevice)
|
|||
#else
|
||||
SMPdestroy (pDevice->matrix) ;
|
||||
#endif
|
||||
if (pDevice->matrix) {
|
||||
FREE(pDevice->matrix);
|
||||
}
|
||||
|
||||
break;
|
||||
case SLV_EQUIL:
|
||||
|
|
@ -53,6 +56,9 @@ TWOdestroy(TWOdevice *pDevice)
|
|||
#else
|
||||
SMPdestroy (pDevice->matrix) ;
|
||||
#endif
|
||||
if (pDevice->matrix) {
|
||||
FREE(pDevice->matrix);
|
||||
}
|
||||
|
||||
break;
|
||||
case SLV_NONE:
|
||||
|
|
|
|||
|
|
@ -491,6 +491,9 @@ int TWOequilSolve(TWOdevice *pDevice)
|
|||
#else
|
||||
SMPdestroy (pDevice->matrix) ;
|
||||
#endif
|
||||
if (pDevice->matrix) {
|
||||
FREE(pDevice->matrix);
|
||||
}
|
||||
|
||||
/* FALLTHROUGH */
|
||||
case SLV_NONE: {
|
||||
|
|
@ -651,6 +654,9 @@ TWObiasSolve(TWOdevice *pDevice, int iterationLimit, BOOLEAN tranAnalysis,
|
|||
#else
|
||||
SMPdestroy (pDevice->matrix) ;
|
||||
#endif
|
||||
if (pDevice->matrix) {
|
||||
FREE(pDevice->matrix);
|
||||
}
|
||||
|
||||
/* FALLTHROUGH */
|
||||
case SLV_NONE:
|
||||
|
|
|
|||
Loading…
Reference in New Issue