diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c index 8714820e2a..9fcbff0f53 100644 --- a/bgpd/bgp_main.c +++ b/bgpd/bgp_main.c @@ -194,7 +194,6 @@ bgp_exit (int status) /* reverse bgp_master_init */ for (ALL_LIST_ELEMENTS (bm->bgp, node, nnode, bgp)) bgp_delete (bgp); - list_free (bm->bgp); /* reverse bgp_dump_init */ bgp_dump_finish (); @@ -246,6 +245,7 @@ bgp_exit (int status) closezlog (); + list_delete (bm->bgp); memset (bm, 0, sizeof (*bm)); if (bgp_debug_count())