summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authorMitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com>2017-12-15 22:15:47 +0100
committerMitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com>2017-12-15 22:15:47 +0100
commit3d57c99404bf5490ddcd803e24594000e10f2731 (patch)
treed5cd16166dff70a3cece57b2450fefd059993f92 /bgpd
parentbgpd: solve valgrind issues in bgp_evpn_cleanup (diff)
downloadfrr-3d57c99404bf5490ddcd803e24594000e10f2731.tar.xz
frr-3d57c99404bf5490ddcd803e24594000e10f2731.zip
bgpd: rd_idspace should be freed in bgp_exit
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_main.c1
-rw-r--r--bgpd/bgpd.c2
2 files changed, 1 insertions, 2 deletions
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c
index 7dd4253b2..a720d31a7 100644
--- a/bgpd/bgp_main.c
+++ b/bgpd/bgp_main.c
@@ -221,6 +221,7 @@ static __attribute__((__noreturn__)) void bgp_exit(int status)
#endif
bgp_zebra_destroy();
+ bf_free(bm->rd_idspace);
list_delete_and_null(&bm->bgp);
memset(bm, 0, sizeof(*bm));
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 6a96ed99b..4e5fe1c7e 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -7564,8 +7564,6 @@ void bgp_terminate(void)
/* reverse bgp_master_init */
bgp_close();
- bf_free(bm->rd_idspace);
-
if (bm->listen_sockets)
list_delete_and_null(&bm->listen_sockets);