In bgp_delete(), variables 'node' and 'next' are overwritten in the nested for loop.
Signed-off-by: Denil Vira <[email protected]> --- bgpd/bgpd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 7a0274c..4b69313 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -2098,8 +2098,8 @@ bgp_delete (struct bgp *bgp) { struct peer *peer; struct peer_group *group; - struct listnode *node; - struct listnode *next; + struct listnode *node, *pnode; + struct listnode *next, *pnext; afi_t afi; int i; @@ -2127,7 +2127,7 @@ bgp_delete (struct bgp *bgp) for (ALL_LIST_ELEMENTS (bgp->group, node, next, group)) { - for (ALL_LIST_ELEMENTS (group->peer, node, next, peer)) + for (ALL_LIST_ELEMENTS (group->peer, pnode, pnext, peer)) { if (BGP_IS_VALID_STATE_FOR_NOTIF(peer->status)) { -- 1.9.1 _______________________________________________ Quagga-dev mailing list [email protected] https://lists.quagga.net/mailman/listinfo/quagga-dev
