Revert "Plug a memory leak in transmission line cpl"

This reverts commit 54458ba172.
This commit is contained in:
Holger Vogt 2021-05-19 17:24:00 +02:00
parent 54458ba172
commit a1bf859c95
3 changed files with 1 additions and 20 deletions

View File

@ -11,4 +11,3 @@ extern int CPLmParam(int,IFvalue*, GENmodel*);
extern int CPLparam(int,IFvalue*, GENinstance*, IFvalue*);
extern int CPLsetup(SMPmatrix*, GENmodel*, CKTcircuit*, int*);
extern int CPLunsetup(GENmodel*, CKTcircuit*);
extern int CPLdevDelete(GENinstance*);

View File

@ -44,7 +44,7 @@ SPICEdev CPLinfo = {
.DEVaccept = NULL,
.DEVdestroy = NULL,
.DEVmodDelete = NULL,
.DEVdelete = CPLdevDelete,
.DEVdelete = NULL,
.DEVsetic = NULL,
.DEVask = CPLask,
.DEVmodAsk = CPLmAsk,

View File

@ -2146,21 +2146,3 @@ static int rotate(int dim_in, int p, int q)
}
int
CPLdevDelete(GENinstance* inst)
{
VI_list* tmplist, * prevlist;
CPLinstance* here = (CPLinstance*)inst;
if (here->cplines2)
tfree(here->cplines2);
if (here->cplines) {
prevlist = tmplist = here->cplines->vi_head;
while (tmplist) {
tmplist = tmplist->next;
tfree(prevlist);
prevlist = tmplist;
}
tfree(here->cplines);
}
return OK;
}