fix a memory leak
ckt->CKTmatrix is now malloced, so has to bee freed as well
This commit is contained in:
parent
ee0b52b779
commit
d5434a2df2
|
|
@ -18,7 +18,7 @@ NIdestroy(CKTcircuit *ckt)
|
|||
{
|
||||
if (ckt->CKTmatrix)
|
||||
SMPdestroy(ckt->CKTmatrix);
|
||||
ckt->CKTmatrix = NULL;
|
||||
FREE(ckt->CKTmatrix);
|
||||
if(ckt->CKTrhs) FREE(ckt->CKTrhs);
|
||||
if(ckt->CKTrhsOld) FREE(ckt->CKTrhsOld);
|
||||
if(ckt->CKTrhsSpare) FREE(ckt->CKTrhsSpare);
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ CKTdestroy(CKTcircuit *ckt)
|
|||
}
|
||||
if(ckt->CKTmatrix) {
|
||||
SMPdestroy(ckt->CKTmatrix);
|
||||
ckt->CKTmatrix = NULL;
|
||||
FREE(ckt->CKTmatrix);
|
||||
}
|
||||
FREE(ckt->CKTbreaks);
|
||||
for(node = ckt->CKTnodes; node; ) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue