BSIM 3.2.4 plug memory leak during remcirc
This commit is contained in:
parent
d6946705f8
commit
d38d907fbc
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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…
Reference in New Issue