summaryrefslogtreecommitdiff
path: root/ospfd/ospf_spf.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_spf.c')
-rw-r--r--ospfd/ospf_spf.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c
index 4f60ce22a9..58fcbfa4a9 100644
--- a/ospfd/ospf_spf.c
+++ b/ospfd/ospf_spf.c
@@ -1956,9 +1956,10 @@ static void ospf_spf_calculate_schedule_worker(struct thread *thread)
rt_time = monotime_since(&start_time, NULL);
/* Free old all routers routing table */
- if (ospf->oall_rtrs)
- /* ospf_route_delete (ospf->old_rtrs); */
+ if (ospf->oall_rtrs) {
ospf_rtrs_free(ospf->oall_rtrs);
+ ospf->oall_rtrs = NULL;
+ }
/* Update all routers routing table */
ospf->oall_rtrs = ospf->all_rtrs;
@@ -1967,9 +1968,10 @@ static void ospf_spf_calculate_schedule_worker(struct thread *thread)
ospf_apiserver_notify_reachable(ospf->oall_rtrs, ospf->all_rtrs);
#endif
/* Free old ABR/ASBR routing table */
- if (ospf->old_rtrs)
- /* ospf_route_delete (ospf->old_rtrs); */
+ if (ospf->old_rtrs) {
ospf_rtrs_free(ospf->old_rtrs);
+ ospf->old_rtrs = NULL;
+ }
/* Update ABR/ASBR routing table */
ospf->old_rtrs = ospf->new_rtrs;