Browse Source

plug a memory leak, delete 'element', if tmalloced before

pre-master-46
Holger Vogt 7 years ago
parent
commit
34f0e98080
  1. 3
      src/xspice/mif/mifsetup.c

3
src/xspice/mif/mifsetup.c

@ -455,6 +455,9 @@ MIFunsetup(GENmodel *inModel,CKTcircuit *ckt)
for (model = (MIFmodel *)inModel; model != NULL;
model = MIFnextModel(model)) {
for (i = 0; i < model->num_param; i++)
if (model->param[i]->is_null)
tfree(model->param[i]->element);
for(here = MIFinstances(model); here != NULL; here = MIFnextInstance(here)) {
/* Skip these expensive allocations if the instance is not analog */
if(! here->analog)

Loading…
Cancel
Save