diff --git a/src/spicelib/devices/bsim3/b3set.c b/src/spicelib/devices/bsim3/b3set.c index 3480b47ee..5c2220f4d 100644 --- a/src/spicelib/devices/bsim3/b3set.c +++ b/src/spicelib/devices/bsim3/b3set.c @@ -1169,6 +1169,11 @@ BSIM3unsetup( BSIM3model *model; BSIM3instance *here; +#ifdef USE_OMP + model = (BSIM3model*)inModel; + tfree(model->BSIM3InstanceArray); +#endif + for (model = (BSIM3model *)inModel; model != NULL; model = BSIM3nextModel(model)) { diff --git a/src/spicelib/devices/bsim3v32/b3v32set.c b/src/spicelib/devices/bsim3v32/b3v32set.c index e0c0cd43a..919b0f2ee 100644 --- a/src/spicelib/devices/bsim3v32/b3v32set.c +++ b/src/spicelib/devices/bsim3v32/b3v32set.c @@ -1181,6 +1181,11 @@ BSIM3v32unsetup( BSIM3v32model *model; BSIM3v32instance *here; +#ifdef USE_OMP + model = (BSIM3v32model*)inModel; + tfree(model->BSIM3v32InstanceArray); +#endif + for (model = (BSIM3v32model *)inModel; model != NULL; model = BSIM3v32nextModel(model)) { diff --git a/src/spicelib/devices/bsim4/b4set.c b/src/spicelib/devices/bsim4/b4set.c index 01d16d8a4..c721d8d8c 100644 --- a/src/spicelib/devices/bsim4/b4set.c +++ b/src/spicelib/devices/bsim4/b4set.c @@ -2761,6 +2761,11 @@ CKTcircuit *ckt) BSIM4model *model; BSIM4instance *here; +#ifdef USE_OMP + model = (BSIM4model*)inModel; + tfree(model->BSIM4InstanceArray); +#endif + for (model = (BSIM4model *)inModel; model != NULL; model = BSIM4nextModel(model)) { diff --git a/src/spicelib/devices/bsim4v5/b4v5set.c b/src/spicelib/devices/bsim4v5/b4v5set.c index 1f26487e2..8c971d8f8 100644 --- a/src/spicelib/devices/bsim4v5/b4v5set.c +++ b/src/spicelib/devices/bsim4v5/b4v5set.c @@ -2139,6 +2139,11 @@ BSIM4v5unsetup( BSIM4v5model *model; BSIM4v5instance *here; +#ifdef USE_OMP + model = (BSIM4v5model*)inModel; + tfree(model->BSIM4v5InstanceArray); +#endif + for (model = (BSIM4v5model *)inModel; model != NULL; model = BSIM4v5nextModel(model)) { diff --git a/src/spicelib/devices/bsim4v6/b4v6set.c b/src/spicelib/devices/bsim4v6/b4v6set.c index 1fa4deee0..405a70499 100644 --- a/src/spicelib/devices/bsim4v6/b4v6set.c +++ b/src/spicelib/devices/bsim4v6/b4v6set.c @@ -2472,6 +2472,11 @@ BSIM4v6unsetup(GENmodel *inModel, CKTcircuit *ckt) BSIM4v6model *model; BSIM4v6instance *here; +#ifdef USE_OMP + model = (BSIM4v6model*)inModel; + tfree(model->BSIM4v6InstanceArray); +#endif + for (model = (BSIM4v6model *)inModel; model != NULL; model = BSIM4v6nextModel(model)) { diff --git a/src/spicelib/devices/bsim4v7/b4v7set.c b/src/spicelib/devices/bsim4v7/b4v7set.c index f768d7fb3..07909c9cd 100644 --- a/src/spicelib/devices/bsim4v7/b4v7set.c +++ b/src/spicelib/devices/bsim4v7/b4v7set.c @@ -2629,6 +2629,11 @@ CKTcircuit *ckt) BSIM4v7model *model; BSIM4v7instance *here; +#ifdef USE_OMP + model = (BSIM4v7model*)inModel; + tfree(model->BSIM4v7InstanceArray); +#endif + for (model = (BSIM4v7model *)inModel; model != NULL; model = BSIM4v7nextModel(model)) { diff --git a/src/spicelib/devices/bsimsoi/b4soiset.c b/src/spicelib/devices/bsimsoi/b4soiset.c index 70965f5f2..3523eae74 100644 --- a/src/spicelib/devices/bsimsoi/b4soiset.c +++ b/src/spicelib/devices/bsimsoi/b4soiset.c @@ -2766,6 +2766,11 @@ B4SOIunsetup( B4SOImodel *model; B4SOIinstance *here; +#ifdef USE_OMP + model = (B4SOImodel*)inModel; + tfree(model->B4SOIInstanceArray); +#endif + for (model = (B4SOImodel *)inModel; model != NULL; model = B4SOInextModel(model)) {