From ae2254aa7f2eb7436734f497658f1f26f4bf37c7 Mon Sep 17 00:00:00 2001 From: Tom Goff Date: Wed, 10 Nov 2010 13:01:41 -0800 Subject: ospf6d: Have ospf6d cleanup when it terminates normally A clean exit makes it easier to use memory debuggers. * ospf6_asbr.c: (ospf6_asbr_terminate) Add a function to do route map cleanup. * ospf6_lsa.c: (ospf6_lsa_terminate) Add a function to cleanup the lsa handler vector. * ospf6_main.c: (ospf6_exit) Add an function that causes ospf6d to gracefully exit. * ospf6_message.c: (ospf6_message_terminate) Add a function that frees the send and receive buffers. * ospf6_top.c: (ospf6_delete) Enable the ospf6_delete() function. Disable ospf6 before freeing everything. --- ospf6d/ospf6_lsa.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ospf6d/ospf6_lsa.c') diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index c1db3741..588b9462 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -712,6 +712,11 @@ ospf6_lsa_init (void) ospf6_install_lsa_handler (&unknown_handler); } +void +ospf6_lsa_terminate (void) +{ + vector_free (ospf6_lsa_handler_vector); +} static char * ospf6_lsa_handler_name (struct ospf6_lsa_handler *h) -- cgit v1.2.3