summaryrefslogtreecommitdiff
path: root/zebra
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2025-02-04 15:13:48 -0500
committerDonald Sharp <sharpd@nvidia.com>2025-02-04 15:13:48 -0500
commitabbfcc49f93bd16d331402dbe1ac9aad4e27495b (patch)
treee837156e9c9fad8fa87940ef33f464d64ae8e401 /zebra
parent29dcfd415f8e1de6514ce3f9d61bd10e17b59bc6 (diff)
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>
Diffstat (limited to 'zebra')
-rw-r--r--zebra/rt_netlink.c3
1 files changed, 3 insertions, 0 deletions
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 */