From: Donald Sharp Date: Tue, 4 Feb 2025 20:13:48 +0000 (-0500) Subject: zebra: Fix srv6 segment nexthop memory leak. X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=abbfcc49f93bd16d331402dbe1ac9aad4e27495b;p=matthieu%2Ffrr.git 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 --- 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 */