From 54a6ed38ac38777f5c2966f74a85cc12659efc87 Mon Sep 17 00:00:00 2001 From: hasso Date: Thu, 26 May 2005 22:12:33 +0000 Subject: * bgpd.c: Deleting bgp->rsclient list needs fix similar to pree-groups deleting fix. Avoid leaking bgp->group, bgp->peer and bgp->rsclient lists. [backport candidate] --- bgpd/ChangeLog | 8 +++++++- bgpd/bgpd.c | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog index 74fe5962..7c339221 100644 --- a/bgpd/ChangeLog +++ b/bgpd/ChangeLog @@ -1,4 +1,10 @@ -2005-05-26 Hasso Tepper +2005-05-27 Hasso Tepper + + * bgpd.c: Deleting bgp->rsclient list needs fix similar to pree-groups + deleting fix. Avoid leaking bgp->group, bgp->peer and bgp->rsclient + lists. + +2005-05-26 Hasso Tepper * bgpd.c: Don't crash while deleting list of peer-groups. diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index f9696610..e3033959 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -1930,11 +1930,14 @@ bgp_delete (struct bgp *bgp) for (ALL_LIST_ELEMENTS (bgp->group, node, next, group)) peer_group_delete (group); + list_delete (bgp->group); for (ALL_LIST_ELEMENTS (bgp->peer, node, next, peer)) peer_delete (peer); + list_delete (bgp->peer); - bgp->rsclient->del = (void (*)(void *)) peer_delete; + for (ALL_LIST_ELEMENTS (bgp->rsclient, node, next, peer)) + peer_delete (peer); list_delete (bgp->rsclient); listnode_delete (bm->bgp, bgp); -- cgit v1.2.1