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 <dindyalsarvesh@gmail.com>
This commit is contained in:
ryndia 2023-04-26 18:52:49 +04:00
parent 9be555f8d4
commit ce0d06d921

View File

@ -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 ;