diff --git a/src/spicelib/devices/bsim2/b2temp.c b/src/spicelib/devices/bsim2/b2temp.c index 6f1c826c7..35fdad0d0 100644 --- a/src/spicelib/devices/bsim2/b2temp.c +++ b/src/spicelib/devices/bsim2/b2temp.c @@ -46,6 +46,13 @@ B2temp(GENmodel *inModel, CKTcircuit *ckt) model->B2vgg2 = 2.0 * model->B2vgg; model->B2vbb2 = 2.0 * model->B2vbb; model->B2Vtm = 8.625e-5 * (model->B2temp + 273.0); + + struct bsim2SizeDependParam *p = model->pSizeDependParamKnot; + while (p) { + struct bsim2SizeDependParam *next_p = p->pNext; + FREE(p); + p = next_p; + } model->pSizeDependParamKnot = NULL; pLastKnot = NULL; diff --git a/src/spicelib/devices/bsim3soi_dd/b3soiddtemp.c b/src/spicelib/devices/bsim3soi_dd/b3soiddtemp.c index 2f49556ef..e31f39903 100644 --- a/src/spicelib/devices/bsim3soi_dd/b3soiddtemp.c +++ b/src/spicelib/devices/bsim3soi_dd/b3soiddtemp.c @@ -50,6 +50,13 @@ int Size_Not_Found; { Temp = ckt->CKTtemp; if (model->B3SOIDDGatesidewallJctPotential < 0.1) model->B3SOIDDGatesidewallJctPotential = 0.1; + + struct b3soiddSizeDependParam *p = model->pSizeDependParamKnot; + while (p) { + struct b3soiddSizeDependParam *next_p = p->pNext; + FREE(p); + p = next_p; + } model->pSizeDependParamKnot = NULL; pLastKnot = NULL; diff --git a/src/spicelib/devices/bsim3soi_fd/b3soifdtemp.c b/src/spicelib/devices/bsim3soi_fd/b3soifdtemp.c index b1433d857..3fb6eae40 100644 --- a/src/spicelib/devices/bsim3soi_fd/b3soifdtemp.c +++ b/src/spicelib/devices/bsim3soi_fd/b3soifdtemp.c @@ -49,6 +49,13 @@ int Size_Not_Found; { Temp = ckt->CKTtemp; if (model->B3SOIFDGatesidewallJctPotential < 0.1) model->B3SOIFDGatesidewallJctPotential = 0.1; + + struct b3soifdSizeDependParam *p = model->pSizeDependParamKnot; + while (p) { + struct b3soifdSizeDependParam *next_p = p->pNext; + FREE(p); + p = next_p; + } model->pSizeDependParamKnot = NULL; pLastKnot = NULL; diff --git a/src/spicelib/devices/bsim3soi_pd/b3soipdtemp.c b/src/spicelib/devices/bsim3soi_pd/b3soipdtemp.c index 0d4f15e16..4e7d04c66 100644 --- a/src/spicelib/devices/bsim3soi_pd/b3soipdtemp.c +++ b/src/spicelib/devices/bsim3soi_pd/b3soipdtemp.c @@ -68,6 +68,13 @@ double tmp3, T7; { Temp = ckt->CKTtemp; if (model->B3SOIPDGatesidewallJctPotential < 0.1) model->B3SOIPDGatesidewallJctPotential = 0.1; + + struct b3soipdSizeDependParam *p = model->pSizeDependParamKnot; + while (p) { + struct b3soipdSizeDependParam *next_p = p->pNext; + FREE(p); + p = next_p; + } model->pSizeDependParamKnot = NULL; pLastKnot = NULL; diff --git a/src/spicelib/devices/bsim3v0/b3v0temp.c b/src/spicelib/devices/bsim3v0/b3v0temp.c index a5bab526d..d5ab05c1b 100644 --- a/src/spicelib/devices/bsim3v0/b3v0temp.c +++ b/src/spicelib/devices/bsim3v0/b3v0temp.c @@ -42,6 +42,13 @@ int Size_Not_Found; model->BSIM3v0bulkJctPotential = 0.1; if (model->BSIM3v0sidewallJctPotential < 0.1) model->BSIM3v0sidewallJctPotential = 0.1; + + struct bsim3v0SizeDependParam *p = model->pSizeDependParamKnot; + while (p) { + struct bsim3v0SizeDependParam *next_p = p->pNext; + FREE(p); + p = next_p; + } model->pSizeDependParamKnot = NULL; pLastKnot = NULL; diff --git a/src/spicelib/devices/bsim3v1/b3v1temp.c b/src/spicelib/devices/bsim3v1/b3v1temp.c index f8b0bc0d7..f4e7e913e 100644 --- a/src/spicelib/devices/bsim3v1/b3v1temp.c +++ b/src/spicelib/devices/bsim3v1/b3v1temp.c @@ -51,6 +51,13 @@ int Size_Not_Found; model->BSIM3v1sidewallJctPotential = 0.1; if (model->BSIM3v1GatesidewallJctPotential < 0.1) model->BSIM3v1GatesidewallJctPotential = 0.1; + + struct bsim3v1SizeDependParam *p = model->pSizeDependParamKnot; + while (p) { + struct bsim3v1SizeDependParam *next_p = p->pNext; + FREE(p); + p = next_p; + } model->pSizeDependParamKnot = NULL; pLastKnot = NULL; diff --git a/src/spicelib/devices/bsim3v32/b3v32temp.c b/src/spicelib/devices/bsim3v32/b3v32temp.c index e969c3087..18550edf6 100644 --- a/src/spicelib/devices/bsim3v32/b3v32temp.c +++ b/src/spicelib/devices/bsim3v32/b3v32temp.c @@ -55,6 +55,13 @@ int Size_Not_Found, error; { model->BSIM3v32GatesidewallJctPotential = 0.1; fprintf(stderr, "Given pbswg is less than 0.1. Pbswg is set to 0.1.\n"); } + + struct bsim3v32SizeDependParam *p = model->pSizeDependParamKnot; + while (p) { + struct bsim3v32SizeDependParam *next_p = p->pNext; + FREE(p); + p = next_p; + } model->pSizeDependParamKnot = NULL; pLastKnot = NULL; diff --git a/src/spicelib/devices/bsim4/b4temp.c b/src/spicelib/devices/bsim4/b4temp.c index 5c4cd12a1..de0aee17c 100644 --- a/src/spicelib/devices/bsim4/b4temp.c +++ b/src/spicelib/devices/bsim4/b4temp.c @@ -220,6 +220,13 @@ int Size_Not_Found, i; } if (!model->BSIM4cgboGiven) model->BSIM4cgbo = 2.0 * model->BSIM4dwc * model->BSIM4coxe; + + struct bsim4SizeDependParam *p = model->pSizeDependParamKnot; + while (p) { + struct bsim4SizeDependParam *next_p = p->pNext; + FREE(p); + p = next_p; + } model->pSizeDependParamKnot = NULL; pLastKnot = NULL; diff --git a/src/spicelib/devices/bsim4v5/b4v5temp.c b/src/spicelib/devices/bsim4v5/b4v5temp.c index aa2fdc3eb..13792f397 100644 --- a/src/spicelib/devices/bsim4v5/b4v5temp.c +++ b/src/spicelib/devices/bsim4v5/b4v5temp.c @@ -138,6 +138,13 @@ int Size_Not_Found, i; } if (!model->BSIM4v5cgboGiven) model->BSIM4v5cgbo = 2.0 * model->BSIM4v5dwc * model->BSIM4v5coxe; + + struct bsim4v5SizeDependParam *p = model->pSizeDependParamKnot; + while (p) { + struct bsim4v5SizeDependParam *next_p = p->pNext; + FREE(p); + p = next_p; + } model->pSizeDependParamKnot = NULL; pLastKnot = NULL; diff --git a/src/spicelib/devices/bsim4v6/b4v6temp.c b/src/spicelib/devices/bsim4v6/b4v6temp.c index 804ae78f4..daa46ef52 100644 --- a/src/spicelib/devices/bsim4v6/b4v6temp.c +++ b/src/spicelib/devices/bsim4v6/b4v6temp.c @@ -163,6 +163,13 @@ int Size_Not_Found, i; } if (!model->BSIM4v6cgboGiven) model->BSIM4v6cgbo = 2.0 * model->BSIM4v6dwc * model->BSIM4v6coxe; + + struct bsim4v6SizeDependParam *p = model->pSizeDependParamKnot; + while (p) { + struct bsim4v6SizeDependParam *next_p = p->pNext; + FREE(p); + p = next_p; + } model->pSizeDependParamKnot = NULL; pLastKnot = NULL; diff --git a/src/spicelib/devices/bsim4v7/b4v7temp.c b/src/spicelib/devices/bsim4v7/b4v7temp.c index 2cbc3f477..588fd5c98 100644 --- a/src/spicelib/devices/bsim4v7/b4v7temp.c +++ b/src/spicelib/devices/bsim4v7/b4v7temp.c @@ -184,6 +184,13 @@ int Size_Not_Found, i; } if (!model->BSIM4v7cgboGiven) model->BSIM4v7cgbo = 2.0 * model->BSIM4v7dwc * model->BSIM4v7coxe; + + struct bsim4SizeDependParam *p = model->pSizeDependParamKnot; + while (p) { + struct bsim4SizeDependParam *next_p = p->pNext; + FREE(p); + p = next_p; + } model->pSizeDependParamKnot = NULL; pLastKnot = NULL; diff --git a/src/spicelib/devices/bsimsoi/b4soitemp.c b/src/spicelib/devices/bsimsoi/b4soitemp.c index 6d617cd67..6d36b5586 100644 --- a/src/spicelib/devices/bsimsoi/b4soitemp.c +++ b/src/spicelib/devices/bsimsoi/b4soitemp.c @@ -89,6 +89,13 @@ B4SOItemp( model->B4SOIGatesidewallJctSPotential = 0.1; if (model->B4SOIGatesidewallJctDPotential < 0.1) /* v4.0 */ model->B4SOIGatesidewallJctDPotential = 0.1; + + struct b4soiSizeDependParam *p = model->pSizeDependParamKnot; + while (p) { + struct b4soiSizeDependParam *next_p = p->pNext; + FREE(p); + p = next_p; + } model->pSizeDependParamKnot = NULL; pLastKnot = NULL;