EFbuild.c: efConnectionFreeLinkedList() remove delay-by-one assumption
freeMagic1 series 2nd order find
This commit is contained in:
parent
9489b23985
commit
ea1a89b19c
|
|
@ -1484,6 +1484,34 @@ efBuildUse(def, subDefName, subUseId, ta, tb, tc, td, te, tf)
|
|||
HashSetValue(he, (ClientData)newuse);
|
||||
}
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* efConnectionFreeLinkedList --
|
||||
*
|
||||
* Release memory for linked-list of Connection* based on internal list
|
||||
* at Connection->conn_next. 'conn' argument must be non-NULL.
|
||||
*
|
||||
* Results:
|
||||
* Deallocates linked-list of Connection* starting at 'conn'
|
||||
*
|
||||
* Side effects:
|
||||
* Deallocates one or more connection record(s).
|
||||
*
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void
|
||||
efConnectionFreeLinkedList(Connection *conn)
|
||||
{
|
||||
while (conn)
|
||||
{
|
||||
Connection *next = conn->conn_next;
|
||||
efFreeConn(conn);
|
||||
conn = next;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
|
|
|
|||
|
|
@ -119,12 +119,9 @@ EFDone(func)
|
|||
HashKill(&def->def_dists);
|
||||
HashKill(&def->def_uses);
|
||||
HashKill(&def->def_devs);
|
||||
for (conn = def->def_conns; conn; conn = conn->conn_next)
|
||||
efFreeConn(conn);
|
||||
for (conn = def->def_caps; conn; conn = conn->conn_next)
|
||||
efFreeConn(conn);
|
||||
for (conn = def->def_resistors; conn; conn = conn->conn_next)
|
||||
efFreeConn(conn);
|
||||
efConnectionFreeLinkedList(def->def_conns);
|
||||
efConnectionFreeLinkedList(def->def_caps);
|
||||
efConnectionFreeLinkedList(def->def_resistors);
|
||||
|
||||
free_magic1_t mm1 = freeMagic1_init();
|
||||
for (kill = def->def_kills; kill; kill = kill->kill_next)
|
||||
|
|
|
|||
|
|
@ -306,6 +306,7 @@ extern void CapHashSetValue();
|
|||
|
||||
extern DevParam *efGetDeviceParams();
|
||||
extern void efBuildNode();
|
||||
extern void efConnectionFreeLinkedList(Connection *conn);
|
||||
extern void efBuildConnect();
|
||||
extern void efBuildResistor();
|
||||
extern void efBuildCap();
|
||||
|
|
|
|||
Loading…
Reference in New Issue