summaryrefslogtreecommitdiff
path: root/lib/if.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-09-27 21:19:20 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-10-05 10:53:17 -0400
commitacdf5e25101bafe334e6b500c3dd0a2babb3c1ec (patch)
treed8b9483a3aeebc7e90ddbe5f765e5e63aecb8e1b /lib/if.c
parentaffe9e99831408960b8b6f8477506ed2874a05dd (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 'lib/if.c')
-rw-r--r--lib/if.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/if.c b/lib/if.c
index ce5816fd22..34de2c8d8b 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -191,8 +191,8 @@ void if_delete(struct interface *ifp)
if_delete_retain(ifp);
- list_free(ifp->connected);
- list_free(ifp->nbr_connected);
+ list_delete_and_null(&ifp->connected);
+ list_delete_and_null(&ifp->nbr_connected);
if_link_params_free(ifp);