Browse Source

Fix some memory leaks (Patch provided by Brian Taylor)

pre-master-46
Holger Vogt 3 years ago
parent
commit
c11613d1f7
  1. 6
      src/ciderlib/twod/twodest.c
  2. 6
      src/ciderlib/twod/twosolve.c

6
src/ciderlib/twod/twodest.c

@ -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:

6
src/ciderlib/twod/twosolve.c

@ -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…
Cancel
Save