From ff23fdfb4b33aa636aa09d144f0865dd5751551a Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 11 Dec 2023 13:41:36 -0500 Subject: 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 (cherry picked from commit 7f9c5c7fa2d927033549a806fd9025a9459f22bc) --- zebra/zebra_rib.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'zebra/zebra_rib.c') diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 51af8953ed..0f559e874f 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -4267,6 +4267,12 @@ struct route_entry *zebra_rib_route_entry_new(vrf_id_t vrf_id, int type, return re; } + +void zebra_rib_route_entry_free(struct route_entry *re) +{ + XFREE(MTYPE_RE, re); +} + /* * Internal route-add implementation; there are a couple of different public * signatures. Callers in this path are responsible for the memory they -- cgit v1.2.3