From: Donald Sharp Date: Thu, 29 Jun 2017 13:45:18 +0000 (-0400) Subject: zebra: Fix some memory leaks on shutdown X-Git-Tag: frr-4.0-dev~431^2~20 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=9b67b5147486be9b754c9c9a6c82bcac49505eb1;p=matthieu%2Ffrr.git zebra: Fix some memory leaks on shutdown Signed-off-by: Donald Sharp --- diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c index e44e5d2e6b..b1edb7d960 100644 --- a/zebra/zebra_mpls.c +++ b/zebra/zebra_mpls.c @@ -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]); } /* diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c index ee9a88c66c..dc8e6e9c0e 100644 --- a/zebra/zebra_vxlan.c +++ b/zebra/zebra_vxlan.c @@ -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); }