Revert "Plug a memory leak in transmission line cpl"
This reverts commit 54458ba172.
This commit is contained in:
parent
54458ba172
commit
a1bf859c95
|
|
@ -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*);
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ SPICEdev CPLinfo = {
|
|||
.DEVaccept = NULL,
|
||||
.DEVdestroy = NULL,
|
||||
.DEVmodDelete = NULL,
|
||||
.DEVdelete = CPLdevDelete,
|
||||
.DEVdelete = NULL,
|
||||
.DEVsetic = NULL,
|
||||
.DEVask = CPLask,
|
||||
.DEVmodAsk = CPLmAsk,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue