]> git.proxmox.com Git - mirror_frr.git/blobdiff - isisd/isis_routemap.c
zebra: Fix label manager memory leak (#5680)
[mirror_frr.git] / isisd / isis_routemap.c
index eb9b661d3743982b5e9f2f9ccd43819a87e7d883..902528e1bbc46366243b4942f1b3ad0435eed75f 100644 (file)
@@ -74,9 +74,12 @@ static void route_match_ip_address_free(void *rule)
        XFREE(MTYPE_ROUTE_MAP_COMPILED, rule);
 }
 
-static struct route_map_rule_cmd route_match_ip_address_cmd = {
-       "ip address", route_match_ip_address, route_match_ip_address_compile,
-       route_match_ip_address_free};
+static const struct route_map_rule_cmd route_match_ip_address_cmd = {
+       "ip address",
+       route_match_ip_address,
+       route_match_ip_address_compile,
+       route_match_ip_address_free
+};
 
 /* ------------------------------------------------------------*/
 
@@ -106,10 +109,13 @@ static void route_match_ip_address_prefix_list_free(void *rule)
        XFREE(MTYPE_ROUTE_MAP_COMPILED, rule);
 }
 
-struct route_map_rule_cmd route_match_ip_address_prefix_list_cmd = {
-       "ip address prefix-list", route_match_ip_address_prefix_list,
+static const struct route_map_rule_cmd
+               route_match_ip_address_prefix_list_cmd = {
+       "ip address prefix-list",
+       route_match_ip_address_prefix_list,
        route_match_ip_address_prefix_list_compile,
-       route_match_ip_address_prefix_list_free};
+       route_match_ip_address_prefix_list_free
+};
 
 /* ------------------------------------------------------------*/
 
@@ -139,9 +145,12 @@ static void route_match_ipv6_address_free(void *rule)
        XFREE(MTYPE_ROUTE_MAP_COMPILED, rule);
 }
 
-static struct route_map_rule_cmd route_match_ipv6_address_cmd = {
-       "ipv6 address", route_match_ipv6_address,
-       route_match_ipv6_address_compile, route_match_ipv6_address_free};
+static const struct route_map_rule_cmd route_match_ipv6_address_cmd = {
+       "ipv6 address",
+       route_match_ipv6_address,
+       route_match_ipv6_address_compile,
+       route_match_ipv6_address_free
+};
 
 /* ------------------------------------------------------------*/
 
@@ -171,10 +180,13 @@ static void route_match_ipv6_address_prefix_list_free(void *rule)
        XFREE(MTYPE_ROUTE_MAP_COMPILED, rule);
 }
 
-struct route_map_rule_cmd route_match_ipv6_address_prefix_list_cmd = {
-       "ipv6 address prefix-list", route_match_ipv6_address_prefix_list,
+static const struct route_map_rule_cmd
+               route_match_ipv6_address_prefix_list_cmd = {
+       "ipv6 address prefix-list",
+       route_match_ipv6_address_prefix_list,
        route_match_ipv6_address_prefix_list_compile,
-       route_match_ipv6_address_prefix_list_free};
+       route_match_ipv6_address_prefix_list_free
+};
 
 /* ------------------------------------------------------------*/
 
@@ -215,9 +227,12 @@ static void route_set_metric_free(void *rule)
        XFREE(MTYPE_ROUTE_MAP_COMPILED, rule);
 }
 
-static struct route_map_rule_cmd route_set_metric_cmd = {
-       "metric", route_set_metric, route_set_metric_compile,
-       route_set_metric_free};
+static const struct route_map_rule_cmd route_set_metric_cmd = {
+       "metric",
+       route_set_metric,
+       route_set_metric_compile,
+       route_set_metric_free
+};
 
 void isis_route_map_init(void)
 {