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, 6 insertions, 2 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 6d947c85..6cb686b7 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -1557,7 +1557,9 @@ static_uninstall_ipv4 (struct prefix *p, struct static_ipv4 *si)
{
if (CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_FIB))
rib_uninstall (rn, rib);
- rib_queue_add (&zebrad, rn, rib);
+ nexthop_delete (rib, nexthop);
+ nexthop_free (nexthop);
+ rib_queue_add (&zebrad, rn, NULL);
}
/* Unlock node. */
route_unlock_node (rn);
@@ -2106,7 +2108,9 @@ static_uninstall_ipv6 (struct prefix *p, struct static_ipv6 *si)
{
if (CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_FIB))
rib_uninstall (rn, rib);
- rib_queue_add (&zebrad, rn, rib);
+ nexthop_delete (rib, nexthop);
+ nexthop_free (nexthop);
+ rib_queue_add (&zebrad, rn, NULL);
}
/* Unlock node. */
route_unlock_node (rn);