Browse Source

devices/asrc, remove memory leak

pre-master-46
h_vogt 10 years ago
committed by rlar
parent
commit
27053b877f
  1. 4
      src/spicelib/devices/asrc/asrcdest.c
  2. 6
      src/spicelib/devices/asrc/asrcset.c

4
src/spicelib/devices/asrc/asrcdest.c

@ -30,5 +30,9 @@ ASRCdestroy(GENmodel **inModel)
mod = next_mod;
}
FREE(asrc_vals);
FREE(asrc_derivs);
asrc_nvals = 0;
*inModel = NULL;
}

6
src/spicelib/devices/asrc/asrcset.c

@ -127,11 +127,15 @@ ASRCunsetup(GENmodel *inModel, CKTcircuit *ckt)
ASRCinstance *here;
for (; model; model = model->ASRCnextModel)
for (here = model->ASRCinstances; here; here = here->ASRCnextInstance)
for (here = model->ASRCinstances; here; here = here->ASRCnextInstance) {
if (here->ASRCbranch) {
CKTdltNNum(ckt, here->ASRCbranch);
here->ASRCbranch = 0;
}
FREE(here->ASRCposptr);
FREE(here->ASRCvars);
FREE(here->ASRCacValues);
}
return OK;
}
Loading…
Cancel
Save