]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Fix srv6 segment nexthop memory leak.
authorDonald Sharp <sharpd@nvidia.com>
Tue, 4 Feb 2025 20:13:48 +0000 (15:13 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Tue, 4 Feb 2025 20:13:48 +0000 (15:13 -0500)
The srv6 segment was being set but never freed
on the statically allocated nexthop.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
zebra/rt_netlink.c

index b6de0a6baa92e0db5bbb9b4c05c3549c2332e20b..9a60e32b659adf8dfc09aca72f1180a1085d54a8 100644 (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 */