From c274f99ab34977f83cb875210d49db37bb55cd31 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Wed, 8 Aug 2018 20:15:40 +0000 Subject: [PATCH] Use the right variable when updating interface routes. PR: 229807 Submitted by: John Hay MFC after: 2 weeks --- usr.sbin/route6d/route6d.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/route6d/route6d.c b/usr.sbin/route6d/route6d.c index 07765de70431..7d873d4dfa40 100644 --- a/usr.sbin/route6d/route6d.c +++ b/usr.sbin/route6d/route6d.c @@ -2223,8 +2223,10 @@ ifrt(struct ifc *ifcp, int again) goto next; } - TAILQ_REMOVE(&riprt_head, rrt, rrt_next); - delroute(&rrt->rrt_info, &rrt->rrt_gw); + TAILQ_REMOVE(&riprt_head, search_rrt, rrt_next); + delroute(&search_rrt->rrt_info, + &search_rrt->rrt_gw); + free(search_rrt); } /* Attach the route to the list */ trace(1, "route: %s/%d: register route (%s)\n",