plug a memory leak in b3temp.cir: no overwriting of size dependent

model parameters in pParam
FIXME: still to be done for other BSIM models!
This commit is contained in:
Holger Vogt 2018-08-25 23:14:03 +02:00
parent b6b66c71bd
commit 3ee1f92d2e
1 changed files with 7 additions and 0 deletions

View File

@ -58,6 +58,13 @@ int Size_Not_Found, error;
{ model->BSIM3GatesidewallJctPotential = 0.1;
fprintf(stderr, "Given pbswg is less than 0.1. Pbswg is set to 0.1.\n");
}
struct bsim3SizeDependParam *p = model->pSizeDependParamKnot;
while (p) {
struct bsim3SizeDependParam *next_p = p->pNext;
FREE(p);
p = next_p;
}
model->pSizeDependParamKnot = NULL;
pLastKnot = NULL;