ospf6d: Fix LSA memory leaks related to graceful restart

Fixes leaks reported by ospf6_gr_topo1 topotest.

Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
This commit is contained in:
Martin Buck 2025-03-25 16:32:47 +01:00
parent 03d0a27418
commit 0db0e7fbd7
2 changed files with 2 additions and 0 deletions

View file

@ -1061,6 +1061,7 @@ void ospf6_receive_lsa(struct ospf6_neighbor *from,
zlog_debug( zlog_debug(
"%s, Not moving to HELPER role, So dicarding GraceLSA", "%s, Not moving to HELPER role, So dicarding GraceLSA",
__func__); __func__);
ospf6_lsa_delete(new);
return; return;
} }
} }

View file

@ -371,6 +371,7 @@ void ospf6_gr_check_lsdb_consistency(struct ospf6 *ospf6,
snprintfrr(reason, sizeof(reason), snprintfrr(reason, sizeof(reason),
"detected inconsistent LSA %s [area %pI4]", "detected inconsistent LSA %s [area %pI4]",
lsa->name, &area->area_id); lsa->name, &area->area_id);
ospf6_lsa_unlock(&lsa);
ospf6_gr_restart_exit(ospf6, reason); ospf6_gr_restart_exit(ospf6, reason);
return; return;
} }