diff --git a/src/spicelib/devices/isrc/isrcdest.c b/src/spicelib/devices/isrc/isrcdest.c index 1f4b9c17b..573d48ce2 100644 --- a/src/spicelib/devices/isrc/isrcdest.c +++ b/src/spicelib/devices/isrc/isrcdest.c @@ -24,7 +24,10 @@ ISRCdestroy(GENmodel **inModel) oldmod = mod; prev = NULL; for(here = mod->ISRCinstances ; here ; here = here->ISRCnextInstance) { - if(prev) FREE(prev); + if(prev) { + tfree(prev->ISRCcoeffs); + FREE(prev); + } prev = here; } if(prev) FREE(prev); diff --git a/src/spicelib/devices/vsrc/vsrcdest.c b/src/spicelib/devices/vsrc/vsrcdest.c index 0d2054b47..3a8334b3b 100644 --- a/src/spicelib/devices/vsrc/vsrcdest.c +++ b/src/spicelib/devices/vsrc/vsrcdest.c @@ -24,7 +24,10 @@ VSRCdestroy(GENmodel **inModel) oldmod = mod; prev = NULL; for(here = mod->VSRCinstances ; here ; here = here->VSRCnextInstance) { - if(prev) FREE(prev); + if(prev) { + tfree(prev->VSRCcoeffs); + FREE(prev); + } prev = here; } if(prev) FREE(prev);