summaryrefslogtreecommitdiff
path: root/zebra/rt_netlink.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-12-11 13:41:36 -0500
committerDonald Sharp <sharpd@nvidia.com>2023-12-11 13:44:06 -0500
commit7f9c5c7fa2d927033549a806fd9025a9459f22bc (patch)
treef523ae1f1b9504069fcec63f385f3ba6ad96a2ab /zebra/rt_netlink.c
parentd41c757763b57f46d52275af5b076b47d076e8d7 (diff)
zebra: The dplane_fpm_nl return path leaks memory
The route entry created when using a ctx to pass route entry data backup to the master pthread in zebra is being leaked. Prevent this from happening. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/rt_netlink.c')
-rw-r--r--zebra/rt_netlink.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index e23b937d5a..98bb890eb6 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -1027,6 +1027,8 @@ int netlink_route_change_read_unicast_internal(struct nlmsghdr *h,
re, ng, startup, ctx);
if (ng)
nexthop_group_delete(&ng);
+ if (ctx)
+ zebra_rib_route_entry_free(re);
} else {
/*
* I really don't see how this is possible