diff --git a/src/spicelib/devices/bsim3v32/b3v32dest.c b/src/spicelib/devices/bsim3v32/b3v32dest.c index 8858e547f..b07ec14cc 100644 --- a/src/spicelib/devices/bsim3v32/b3v32dest.c +++ b/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; } diff --git a/src/spicelib/devices/bsim3v32/b3v32set.c b/src/spicelib/devices/bsim3v32/b3v32set.c index e558536e3..8d18aeb57 100644 --- a/src/spicelib/devices/bsim3v32/b3v32set.c +++ b/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