From 33686c2839c4766d31aea6b8e3a3a7757a4a131a Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Tue, 31 Aug 2021 13:41:40 +0300 Subject: [PATCH] ospfd: correctly cleanup spf data ospf_spf_cleanup frees the data so we need to reset the stale pointers. Fixes #9523. Signed-off-by: Igor Ryzhov (cherry picked from commit 57e4c21583a9fa4c9d34fa8263930c3a1d5c6cd9) --- ospfd/ospf_spf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c index 43d6ff44ba..fdfded15ae 100644 --- a/ospfd/ospf_spf.c +++ b/ospfd/ospf_spf.c @@ -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, -- 2.39.5