Browse Source

BSIM 3.2.4 plug memory leak during remcirc

pre-master-46
h_vogt 13 years ago
committed by rlar
parent
commit
d38d907fbc
  1. 10
      src/spicelib/devices/bsim3v32/b3v32dest.c
  2. 2
      src/spicelib/devices/bsim3v32/b3v32set.c

10
src/spicelib/devices/bsim3v32/b3v32dest.c

@ -35,7 +35,10 @@ BSIM3v32destroy (GENmodel **inModel)
FREE(pParamOld);
pParam = NULL;
/** end of extra code **/
if(oldmod) FREE(oldmod);
if(oldmod) {
FREE(oldmod->BSIM3v32version);
FREE(oldmod);
}
oldmod = mod;
prev = NULL;
for (here = mod->BSIM3v32instances; here; here = here->BSIM3v32nextInstance) {
@ -44,7 +47,10 @@ BSIM3v32destroy (GENmodel **inModel)
}
if(prev) FREE(prev);
}
if(oldmod) FREE(oldmod);
if(oldmod) {
FREE(oldmod->BSIM3v32version);
FREE(oldmod);
}
*model = NULL;
return;
}

2
src/spicelib/devices/bsim3v32/b3v32set.c

@ -69,7 +69,7 @@ IFuid tmpName;
* we always choose the most recent.
*/
if (!model->BSIM3v32versionGiven)
model->BSIM3v32version = "3.2.4";
model->BSIM3v32version = copy("3.2.4");
/* I have added below the code that translate model string
* into an integer. This trick is meant to speed up the

Loading…
Cancel
Save