]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: Fix some memory leaks on shutdown
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 29 Jun 2017 13:45:18 +0000 (09:45 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 8 Aug 2017 14:28:50 +0000 (10:28 -0400)
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/zebra_mpls.c
zebra/zebra_vxlan.c

index e44e5d2e6b52895c439fabba95f7954d49ef14c1..b1edb7d960dd3ffe941b7ef92e374f9534cb8257 100644 (file)
@@ -1321,9 +1321,9 @@ static void nhlfe_print(zebra_nhlfe_t *nhlfe, struct vty *vty)
        default:
                break;
        }
-       vty_out(vty, "%s",
-               CHECK_FLAG(nhlfe->flags, NHLFE_FLAG_INSTALLED) ? " (installed)"
-                                                              : "");
+       vty_out(vty, "%s", CHECK_FLAG(nhlfe->flags, NHLFE_FLAG_INSTALLED)
+                                  ? " (installed)"
+                                  : "");
        vty_out(vty, "\n");
 }
 
@@ -2807,6 +2807,8 @@ void zebra_mpls_close_tables(struct zebra_vrf *zvrf)
        hash_free(zvrf->lsp_table);
        hash_clean(zvrf->slsp_table, NULL);
        hash_free(zvrf->slsp_table);
+       route_table_finish(zvrf->fec_table[AFI_IP]);
+       route_table_finish(zvrf->fec_table[AFI_IP6]);
 }
 
 /*
index ee9a88c66c3ad1dde5d53b443b2f902e902d4c74..dc8e6e9c0e62b9b8d3e8a00dfabbd517b249b7fd 100644 (file)
@@ -3736,4 +3736,5 @@ void zebra_vxlan_init_tables(struct zebra_vrf *zvrf)
 void zebra_vxlan_close_tables(struct zebra_vrf *zvrf)
 {
        hash_iterate(zvrf->vni_table, zvni_cleanup_all, zvrf);
+       hash_free(zvrf->vni_table);
 }