summaryrefslogtreecommitdiff
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r--zebra/zebra_rib.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index c4c80b156b..9dc0630c8c 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -1118,7 +1118,6 @@ static int rib_can_delete_dest(rib_dest_t *dest)
int rib_gc_dest(struct route_node *rn)
{
rib_dest_t *dest;
- struct zebra_vrf *zvrf;
dest = rib_dest_from_rnode(rn);
if (!dest)
@@ -1127,9 +1126,12 @@ int rib_gc_dest(struct route_node *rn)
if (!rib_can_delete_dest(dest))
return 0;
- zvrf = rib_dest_vrf(dest);
- if (IS_ZEBRA_DEBUG_RIB)
+ if (IS_ZEBRA_DEBUG_RIB) {
+ struct zebra_vrf *zvrf;
+
+ zvrf = rib_dest_vrf(dest);
rnode_debug(rn, zvrf_id(zvrf), "removing dest from table");
+ }
dest->rnode = NULL;
XFREE(MTYPE_RIB_DEST, dest);