--- embedaddon/quagga/lib/routemap.c 2012/02/21 17:26:12 1.1.1.1 +++ embedaddon/quagga/lib/routemap.c 2016/11/02 10:09:11 1.1.1.2 @@ -28,7 +28,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330 #include "command.h" #include "vty.h" #include "log.h" - + /* Vector for route match rules. */ static vector route_match_vec; @@ -72,7 +72,7 @@ route_map_rule_delete (struct route_map_rule_list *, static void route_map_index_delete (struct route_map_index *, int); - + /* New route map allocation. Please note route map's name must be specified. */ static struct route_map * @@ -420,7 +420,7 @@ route_map_rule_new (void) new = XCALLOC (MTYPE_ROUTE_MAP_RULE, sizeof (struct route_map_rule)); return new; } - + /* Install rule command to the match list. */ void route_map_install_match (struct route_map_rule_cmd *cmd) @@ -897,8 +897,11 @@ route_map_finish (void) route_match_vec = NULL; vector_free (route_set_vec); route_set_vec = NULL; + /* cleanup route_map */ + while (route_map_master.head) + route_map_delete (route_map_master.head); } - + /* VTY related functions. */ DEFUN (route_map, route_map_cmd,