Skip to content

Commit

Permalink
Merge pull request #10037 from FRRouting/mergify/bp/stable/8.0/pr-10035
Browse files Browse the repository at this point in the history
ospfd: Prevent use after free on shutdown (backport #10035)
  • Loading branch information
idryzhov committed Nov 12, 2021
2 parents 471e76a + 0f7adc2 commit 726d103
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ospfd/ospf_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -705,11 +705,11 @@ static int ospf_if_delete_hook(struct interface *ifp)
*/
ospf_del_if_params(ifp, IF_DEF_PARAMS(ifp));

route_table_finish(IF_OIFS(ifp));

for (rn = route_top(IF_OIFS_PARAMS(ifp)); rn; rn = route_next(rn))
if (rn->info)
ospf_del_if_params(ifp, rn->info);

route_table_finish(IF_OIFS(ifp));
route_table_finish(IF_OIFS_PARAMS(ifp));

XFREE(MTYPE_OSPF_IF_INFO, ifp->info);
Expand Down

0 comments on commit 726d103

Please sign in to comment.