]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospfd: correctly cleanup spf data
authorIgor Ryzhov <iryzhov@nfware.com>
Tue, 31 Aug 2021 10:41:40 +0000 (13:41 +0300)
committermergify-bot <noreply@mergify.io>
Tue, 31 Aug 2021 21:27:33 +0000 (21:27 +0000)
ospf_spf_cleanup frees the data so we need to reset the stale pointers.

Fixes #9523.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit 57e4c21583a9fa4c9d34fa8263930c3a1d5c6cd9)

ospfd/ospf_spf.c

index 43d6ff44ba0e6194ed8221cd9688cda6f2186f0d..fdfded15ae5506af3c726ed21d5bfa96dc487bd4 100644 (file)
@@ -1781,6 +1781,9 @@ void ospf_spf_calculate_area(struct ospf *ospf, struct ospf_area *area,
                                    ospf->ti_lfa_protection_type);
 
        ospf_spf_cleanup(area->spf, area->spf_vertex_list);
+
+       area->spf = NULL;
+       area->spf_vertex_list = NULL;
 }
 
 void ospf_spf_calculate_areas(struct ospf *ospf, struct route_table *new_table,