From abbfcc49f93bd16d331402dbe1ac9aad4e27495b Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 4 Feb 2025 15:13:48 -0500 Subject: [PATCH] zebra: Fix srv6 segment nexthop memory leak. The srv6 segment was being set but never freed on the statically allocated nexthop. Signed-off-by: Donald Sharp --- zebra/rt_netlink.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index b6de0a6baa..9a60e32b65 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -1298,6 +1298,9 @@ static int netlink_route_change_read_unicast_internal(struct nlmsghdr *h, if (nh.nh_label) nexthop_del_labels(&nh); + + if (nh.nh_srv6) + nexthop_del_srv6_seg6(&nh); } else { /* XXX: need to compare the entire list of * nexthops here for NLM_F_APPEND stupidity */