diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-09-27 21:19:20 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-10-05 10:53:17 -0400 |
| commit | acdf5e25101bafe334e6b500c3dd0a2babb3c1ec (patch) | |
| tree | d8b9483a3aeebc7e90ddbe5f765e5e63aecb8e1b /ospfd/ospf_interface.c | |
| parent | affe9e99831408960b8b6f8477506ed2874a05dd (diff) | |
*: 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_interface.c')
| -rw-r--r-- | ospfd/ospf_interface.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index b57f8a4d38..67ce6f1713 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -313,10 +313,10 @@ void ospf_if_free(struct ospf_interface *oi) route_table_finish(oi->ls_upd_queue); /* Free any lists that should be freed */ - list_free(oi->nbr_nbma); + list_delete_and_null(&oi->nbr_nbma); - list_free(oi->ls_ack); - list_free(oi->ls_ack_direct.ls_ack); + list_delete_and_null(&oi->ls_ack); + list_delete_and_null(&oi->ls_ack_direct.ls_ack); if (IS_DEBUG_OSPF_EVENT) zlog_debug("%s: ospf interface %s vrf %s id %u deleted", |
