From 7b8def580a061c7e454db83b85e8453d13d65c78 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 19 Oct 2016 13:44:38 -0400 Subject: [PATCH] bgpd: Fix shutdown order. When shutting down bgp we were freeing the ecommunity hash before we unintern'ed everything in it. This is fallout from: 289d250 bgpd, lib: memory cleanups for valgrind, plus debug changes Basically we started free'ing data we've never freed before which caused us to access a hash that had already been freed. Signed-off-by: Donald Sharp --- bgpd/bgp_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c index 3aa16b2632..50ca7eda4c 100644 --- a/bgpd/bgp_main.c +++ b/bgpd/bgp_main.c @@ -253,9 +253,6 @@ bgp_exit (int status) bgp_delete (bgp); list_free (bm->bgp); - /* reverse bgp_attr_init */ - bgp_attr_finish (); - /* reverse bgp_dump_init */ bgp_dump_finish (); @@ -265,6 +262,9 @@ bgp_exit (int status) /* cleanup route maps */ bgp_route_map_terminate(); + /* reverse bgp_attr_init */ + bgp_attr_finish (); + /* reverse access_list_init */ access_list_add_hook (NULL); access_list_delete_hook (NULL); -- 2.39.5