Plug a memory leak in TXL transmissiom line (y device)
This commit is contained in:
parent
dca52aea3a
commit
c0bd7ca6e2
|
|
@ -8,3 +8,4 @@ extern int TXLmParam(int,IFvalue*,GENmodel*);
|
||||||
extern int TXLparam(int,IFvalue*,GENinstance*,IFvalue*);
|
extern int TXLparam(int,IFvalue*,GENinstance*,IFvalue*);
|
||||||
extern int TXLsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*);
|
extern int TXLsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*);
|
||||||
extern int TXLunsetup(GENmodel*, CKTcircuit*);
|
extern int TXLunsetup(GENmodel*, CKTcircuit*);
|
||||||
|
extern int TXLdevDelete(GENinstance*);
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ SPICEdev TXLinfo = {
|
||||||
.DEVaccept = NULL,
|
.DEVaccept = NULL,
|
||||||
.DEVdestroy = NULL,
|
.DEVdestroy = NULL,
|
||||||
.DEVmodDelete = NULL,
|
.DEVmodDelete = NULL,
|
||||||
.DEVdelete = NULL,
|
.DEVdelete = TXLdevDelete,
|
||||||
.DEVsetic = NULL,
|
.DEVsetic = NULL,
|
||||||
.DEVask = TXLask,
|
.DEVask = TXLask,
|
||||||
.DEVmodAsk = TXLmodAsk,
|
.DEVmodAsk = TXLmodAsk,
|
||||||
|
|
|
||||||
|
|
@ -1172,3 +1172,13 @@ static int find_roots(double a1_in, double a2_in, double a3_in,
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
TXLdevDelete(GENinstance* inst)
|
||||||
|
{
|
||||||
|
TXLinstance* here = (TXLinstance*)inst;
|
||||||
|
if (here->txline2)
|
||||||
|
tfree(here->txline2);
|
||||||
|
if (here->txline)
|
||||||
|
tfree(here->txline);
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue