summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_rnh.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 /zebra/zebra_rnh.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 'zebra/zebra_rnh.c')
-rw-r--r--zebra/zebra_rnh.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c
index fabb4f9e1..355fef94f 100644
--- a/zebra/zebra_rnh.c
+++ b/zebra/zebra_rnh.c
@@ -160,9 +160,9 @@ struct rnh *zebra_lookup_rnh(struct prefix *p, vrf_id_t vrfid, rnh_type_t type)
void zebra_free_rnh(struct rnh *rnh)
{
rnh->flags |= ZEBRA_NHT_DELETED;
- list_free(rnh->client_list);
- list_free(rnh->zebra_static_route_list);
- list_free(rnh->zebra_pseudowire_list);
+ list_delete_and_null(&rnh->client_list);
+ list_delete_and_null(&rnh->zebra_static_route_list);
+ list_delete_and_null(&rnh->zebra_pseudowire_list);
free_state(rnh->vrf_id, rnh->state, rnh->node);
XFREE(MTYPE_RNH, rnh);
}