From acdf5e25101bafe334e6b500c3dd0a2babb3c1ec Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 27 Sep 2017 21:19:20 -0400 Subject: *: 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 --- ripd/ripd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ripd') diff --git a/ripd/ripd.c b/ripd/ripd.c index 2a0752253..bededba7f 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -132,8 +132,7 @@ static int rip_garbage_collect(struct thread *t) /* Unlock route_node. */ listnode_delete(rp->info, rinfo); if (list_isempty((struct list *)rp->info)) { - list_free(rp->info); - rp->info = NULL; + list_delete_and_null((struct list **)&rp->info); route_unlock_node(rp); } -- cgit v1.2.3