remove memory leaks
This commit is contained in:
parent
127213bff0
commit
7e96dcc639
|
|
@ -1,3 +1,7 @@
|
||||||
|
2011-12-29 Holger Vogt
|
||||||
|
* inppas3.c, cktdest.c: reduce memory leaks
|
||||||
|
* inpsymt.c: beautify
|
||||||
|
|
||||||
2011-12-29 Holger Vogt
|
2011-12-29 Holger Vogt
|
||||||
* b4v6dest.c : improved removal of circuit installation,
|
* b4v6dest.c : improved removal of circuit installation,
|
||||||
bug no. 3229770. Memory leaks are quasi gone for
|
bug no. 3229770. Memory leaks are quasi gone for
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,8 @@ CKTdestroy(CKTcircuit *ckt)
|
||||||
FREE(node);
|
FREE(node);
|
||||||
node = nnode;
|
node = nnode;
|
||||||
}
|
}
|
||||||
|
ckt->CKTnodes = NULL;
|
||||||
|
ckt->CKTlastNode = NULL;
|
||||||
|
|
||||||
FREE(ckt->CKTrhs);
|
FREE(ckt->CKTrhs);
|
||||||
FREE(ckt->CKTrhsOld);
|
FREE(ckt->CKTrhsOld);
|
||||||
|
|
@ -63,9 +65,13 @@ CKTdestroy(CKTcircuit *ckt)
|
||||||
|
|
||||||
FREE(ckt->CKTstat->STATdevNum);
|
FREE(ckt->CKTstat->STATdevNum);
|
||||||
FREE(ckt->CKTstat);
|
FREE(ckt->CKTstat);
|
||||||
|
FREE(ckt->CKThead);
|
||||||
|
|
||||||
|
#ifdef XSPICE
|
||||||
|
FREE(ckt->enh);
|
||||||
|
FREE(ckt->evt);
|
||||||
|
#endif
|
||||||
|
|
||||||
ckt->CKTnodes = NULL;
|
|
||||||
ckt->CKTlastNode = NULL;
|
|
||||||
FREE(ckt);
|
FREE(ckt);
|
||||||
return(OK);
|
return(OK);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,10 @@ INPpas3(CKTcircuit *ckt, card *data, INPtables *tab, TSKtask *task,
|
||||||
/* loop until we run out of data */
|
/* loop until we run out of data */
|
||||||
INPgetTok(&line,&name,1);
|
INPgetTok(&line,&name,1);
|
||||||
/* check to see if in the form V(xxx) and grab the xxx */
|
/* check to see if in the form V(xxx) and grab the xxx */
|
||||||
if( *name == 0) break; /* end of line */
|
if( *name == 0) {
|
||||||
|
FREE(name);
|
||||||
|
break; /* end of line */
|
||||||
|
}
|
||||||
if( (*name == 'V' || *name == 'v') && !name[1] ) {
|
if( (*name == 'V' || *name == 'v') && !name[1] ) {
|
||||||
/* looks like V - must be V(xx) - get xx now*/
|
/* looks like V - must be V(xx) - get xx now*/
|
||||||
INPgetTok(&line,&name,1);
|
INPgetTok(&line,&name,1);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue