frontend/breakp.c, cleanup `dbfree1()' and `dbfree()'
This commit is contained in:
parent
8ce99a3c66
commit
1a257cd55a
|
|
@ -297,26 +297,23 @@ com_sttus(wordlist *wl)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
dbfree1(struct dbcomm *dd)
|
dbfree1(struct dbcomm *d)
|
||||||
{
|
{
|
||||||
tfree(dd->db_nodename1);
|
tfree(d->db_nodename1);
|
||||||
tfree(dd->db_nodename2);
|
tfree(d->db_nodename2);
|
||||||
if (dd->db_also) {
|
if (d->db_also)
|
||||||
dbfree(dd->db_also);
|
dbfree(d->db_also);
|
||||||
dd->db_also = NULL;
|
tfree(d);
|
||||||
}
|
|
||||||
tfree(dd);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
dbfree(struct dbcomm *db)
|
dbfree(struct dbcomm *d)
|
||||||
{
|
{
|
||||||
struct dbcomm *dd, *dn;
|
while (d) {
|
||||||
|
struct dbcomm *next_d = d->db_next;
|
||||||
for (dd = db; dd; dd = dn) {
|
dbfree1(d);
|
||||||
dn = dd->db_next;
|
d = next_d;
|
||||||
dbfree1(dd);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue