Plug some more memory leak in TXL transmission line.

This commit is contained in:
Holger Vogt 2021-05-18 23:17:06 +02:00
parent 74ba5c1f96
commit d2ac525f52
1 changed files with 9 additions and 1 deletions

View File

@ -1175,10 +1175,18 @@ static int find_roots(double a1_in, double a2_in, double a3_in,
int
TXLdevDelete(GENinstance* inst)
{
VI_list_txl *tmplist, *prevlist;
TXLinstance* here = (TXLinstance*)inst;
if (here->txline2)
tfree(here->txline2);
if (here->txline)
if (here->txline) {
prevlist = tmplist = here->txline->vi_head;
while(tmplist) {
tmplist = tmplist->next;
tfree(prevlist);
prevlist = tmplist;
}
tfree(here->txline);
}
return OK;
}