summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_lsa.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-09-28 03:19:20 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-10-05 16:53:17 +0200
commitacdf5e25101bafe334e6b500c3dd0a2babb3c1ec (patch)
treed8b9483a3aeebc7e90ddbe5f765e5e63aecb8e1b /ospfd/ospf_lsa.c
parent*: Convert list_delete(struct list *) to ** to allow nulling (diff)
downloadfrr-acdf5e25101bafe334e6b500c3dd0a2babb3c1ec.tar.xz
frr-acdf5e25101bafe334e6b500c3dd0a2babb3c1ec.zip
*: Convert list_free usage to list_delete
list_free is occassionally being used to delete the list and accidently not deleting all the nodes. We keep running across this usage pattern. Let's remove the temptation and only allow list_delete to handle list deletion. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'ospfd/ospf_lsa.c')
-rw-r--r--ospfd/ospf_lsa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index 270021cab..1795225ca 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -3622,7 +3622,7 @@ void ospf_refresher_unregister_lsa(struct ospf *ospf, struct ospf_lsa *lsa)
ospf->lsa_refresh_queue.qs[lsa->refresh_list];
listnode_delete(refresh_list, lsa);
if (!listcount(refresh_list)) {
- list_free(refresh_list);
+ list_delete_and_null(&refresh_list);
ospf->lsa_refresh_queue.qs[lsa->refresh_list] = NULL;
}
ospf_lsa_unlock(&lsa); /* lsa_refresh_queue */
@@ -3691,7 +3691,7 @@ int ospf_lsa_refresh_walker(struct thread *t)
lsa->refresh_list = -1;
listnode_add(lsa_to_refresh, lsa);
}
- list_free(refresh_list);
+ list_delete_and_null(&refresh_list);
}
}