summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-03-07 14:45:24 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-03-07 14:45:24 +0100
commit080b97f2ab434e257b30a2f11883aa1851e75834 (patch)
treeba2032aa2b366978fa1baea3e3e4a5f1f0b8ca37 /bgpd
parentMerge pull request #238 from donaldsharp/bgp_memory (diff)
downloadfrr-080b97f2ab434e257b30a2f11883aa1851e75834.tar.xz
frr-080b97f2ab434e257b30a2f11883aa1851e75834.zip
bgpd: Clean up bfd memory *before* deleting the peer
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgpd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index ef633c16e..528073123 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -2485,14 +2485,14 @@ peer_group_delete (struct peer_group *group)
XFREE(MTYPE_BGP_PEER_HOST, group->name);
group->name = NULL;
+ bfd_info_free(&(group->conf->bfd_info));
+
group->conf->group = NULL;
peer_delete (group->conf);
/* Delete from all peer_group list. */
listnode_delete (bgp->group, group);
- bfd_info_free(&(group->conf->bfd_info));
-
peer_group_free (group);
return 0;