From ce0d06d9215fc8ea75af61a2ecdb6144de04b4f3 Mon Sep 17 00:00:00 2001 From: ryndia Date: Wed, 26 Apr 2023 18:52:49 +0400 Subject: [PATCH] ospfd: ospf_route.c memory leak fix The rn variable has its info attribute being replaced with a new ospf route before being freed properly. Signed-off-by: ryndia --- ospfd/ospf_route.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ospfd/ospf_route.c b/ospfd/ospf_route.c index 75868056adb3..cdb1eb009543 100644 --- a/ospfd/ospf_route.c +++ b/ospfd/ospf_route.c @@ -684,6 +684,8 @@ void ospf_intra_add_stub(struct route_table *rt, struct router_lsa_link *link, __func__); } } + if (rn->info) + ospf_route_free(rn->info); rn->info = or ;