vsrcdest.c, isrcdest.c: fix memory leak by freeing VSRCcoeffs, ISRCcoeffs

This commit is contained in:
h_vogt 2013-08-20 23:19:36 +02:00 committed by rlar
parent 075b620a86
commit a97b330965
2 changed files with 8 additions and 2 deletions

View File

@ -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);

View File

@ -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);