summaryrefslogtreecommitdiff
path: root/zebra/zebra_vrf.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-02-01 10:52:21 -0500
committerGitHub <noreply@github.com>2017-02-01 10:52:21 -0500
commit5a2bd83d9de7bdd528b4be78f337f9c7a196c70b (patch)
tree477672d8900b8fcba04bd36f7b5122242d9ac876 /zebra/zebra_vrf.c
parent681ca8cc528a1aec1e451b9ae860d3825f999052 (diff)
parentd24736fa17f9970dd58c5e6417bf3a5444011f5e (diff)
Merge pull request #146 from opensourcerouting/assorted-stable
assorted fixes for stable/2.0
Diffstat (limited to 'zebra/zebra_vrf.c')
-rw-r--r--zebra/zebra_vrf.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/zebra/zebra_vrf.c b/zebra/zebra_vrf.c
index b1c5e4dd35..4715f6e12c 100644
--- a/zebra/zebra_vrf.c
+++ b/zebra/zebra_vrf.c
@@ -217,6 +217,7 @@ zebra_vrf_delete (struct vrf *vrf)
{
struct zebra_vrf *zvrf = vrf->info;
struct route_table *table;
+ rib_table_info_t *info;
u_int32_t table_id;
afi_t afi;
safi_t safi;
@@ -273,8 +274,9 @@ zebra_vrf_delete (struct vrf *vrf)
for (safi = SAFI_UNICAST; safi <= SAFI_MULTICAST; safi++)
{
table = zvrf->table[afi][safi];
- XFREE (MTYPE_RIB_TABLE_INFO, table->info);
+ info = table->info;
route_table_finish (table);
+ XFREE (MTYPE_RIB_TABLE_INFO, info);
table = zvrf->stable[afi][safi];
route_table_finish (table);
@@ -284,8 +286,9 @@ zebra_vrf_delete (struct vrf *vrf)
if (zvrf->other_table[afi][table_id])
{
table = zvrf->other_table[afi][table_id];
- XFREE (MTYPE_RIB_TABLE_INFO, table->info);
+ info = table->info;
route_table_finish (table);
+ XFREE (MTYPE_RIB_TABLE_INFO, info);
}
route_table_finish (zvrf->rnh_table[afi]);