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 <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2025-02-04 15:13:48 -05:00
parent 29dcfd415f
commit abbfcc49f9

View File

@ -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 */