BSIM 4.7.0 plug memory leak during remcirc

This commit is contained in:
h_vogt 2013-08-24 18:07:37 +02:00 committed by rlar
parent d38d907fbc
commit abbda029e1
2 changed files with 7 additions and 2 deletions

View File

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

View File

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