summaryrefslogtreecommitdiffstats
path: root/ospfd
diff options
context:
space:
mode:
authorMark Stapp <mjs@cisco.com>2024-09-06 15:15:50 +0200
committerMark Stapp <mjs@cisco.com>2024-09-06 15:15:50 +0200
commit2b2a12b9c885b5b9110f57ad3666a8c6db8fb4c8 (patch)
tree87a8731b2b087ee389a92fbfb04f583301846cda /ospfd
parentMerge pull request #16712 from opensourcerouting/fix/do_not_send_route_refres... (diff)
downloadfrr-2b2a12b9c885b5b9110f57ad3666a8c6db8fb4c8.tar.xz
frr-2b2a12b9c885b5b9110f57ad3666a8c6db8fb4c8.zip
ospfd: add assert to resolve SA warning
Resolve a couple of SA warnings by asserting that pointers are valid. Signed-off-by: Mark Stapp <mjs@cisco.com>
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_flood.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ospfd/ospf_flood.c b/ospfd/ospf_flood.c
index 2af4ae317..40a76a0a3 100644
--- a/ospfd/ospf_flood.c
+++ b/ospfd/ospf_flood.c
@@ -1094,8 +1094,13 @@ void ospf_ls_retransmit_add(struct ospf_neighbor *nbr, struct ospf_lsa *lsa)
if (ls_rxmt_node->lsa_list_entry ==
ospf_lsa_list_first(&nbr->ls_rxmt_list))
rxmt_head_replaced = true;
+
+ /* Keep SA happy */
+ assert(ls_rxmt_node->lsa_list_entry != NULL);
+
ospf_lsa_list_del(&nbr->ls_rxmt_list,
ls_rxmt_node->lsa_list_entry);
+
XFREE(MTYPE_OSPF_LSA_LIST, ls_rxmt_node->lsa_list_entry);
ospf_lsdb_delete(&nbr->ls_rxmt, old);
if (IS_DEBUG_OSPF(lsa, LSA_FLOODING))
@@ -1163,8 +1168,13 @@ void ospf_ls_retransmit_delete(struct ospf_neighbor *nbr, struct ospf_lsa *lsa)
rxmt_timer_reset = false;
lsa->retransmit_counter--;
+
+ /* Keep SA happy */
+ assert(ls_rxmt_node->lsa_list_entry != NULL);
+
ospf_lsa_list_del(&nbr->ls_rxmt_list,
ls_rxmt_node->lsa_list_entry);
+
XFREE(MTYPE_OSPF_LSA_LIST, ls_rxmt_node->lsa_list_entry);
ospf_lsdb_delete(&nbr->ls_rxmt, lsa);
if (IS_DEBUG_OSPF(lsa, LSA_FLOODING))