diff options
author | hasso <hasso> | 2005-05-26 22:12:33 +0000 |
---|---|---|
committer | hasso <hasso> | 2005-05-26 22:12:33 +0000 |
commit | 54a6ed38ac38777f5c2966f74a85cc12659efc87 (patch) | |
tree | d38112804dd53e9305514feb3d570a5214085745 | |
parent | 500e418921b0a2141e182a346f8d32864516236d (diff) |
* 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]
-rw-r--r-- | bgpd/ChangeLog | 8 | ||||
-rw-r--r-- | 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 <hass at quagga.net> +2005-05-27 Hasso Tepper <hasso at quagga.net> + + * 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 <hasso at quagga.net> * 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); |