Browse Source

BSIM 4.7.0 plug memory leak during remcirc

pre-master-46
h_vogt 13 years ago
committed by rlar
parent
commit
abbda029e1
  1. 7
      src/spicelib/devices/bsim4/b4dest.c
  2. 2
      src/spicelib/devices/bsim4/b4set.c

7
src/spicelib/devices/bsim4/b4dest.c

@ -37,7 +37,10 @@ BSIM4destroy(
FREE(pParamOld);
pParam = NULL;
/** end of extra code **/
if(oldmod) FREE(oldmod);
if(oldmod) {
FREE(oldmod->BSIM4version);
FREE(oldmod);
}
oldmod = mod;
prev = (BSIM4instance *)NULL;
for (here = mod->BSIM4instances; here; here = here->BSIM4nextInstance) {
@ -51,6 +54,8 @@ BSIM4destroy(
/* free just once for all models */
FREE(oldmod->BSIM4InstanceArray);
#endif
/* oldmod->BSIM4modName to be freed in INPtabEnd() */
FREE(oldmod->BSIM4version);
FREE(oldmod);
}
*model = NULL;

2
src/spicelib/devices/bsim4/b4set.c

@ -208,7 +208,7 @@ BSIM4instance **InstArray;
}
if (!model->BSIM4versionGiven)
model->BSIM4version = "4.7.0";
model->BSIM4version = copy("4.7.0");
if (!model->BSIM4toxrefGiven)
model->BSIM4toxref = 30.0e-10;
if (!model->BSIM4eotGiven)

Loading…
Cancel
Save