xref: /freebsd/sbin/ipf/libipf/alist_free.c (revision ec0ea6efa1ad229d75c394c1a9b9cac33af2b1d3)
1 /*
2  * Copyright (C) 2012 by Darren Reed.
3  *
4  * See the IPFILTER.LICENCE file for details on licencing.
5  *
6  * $Id: alist_free.c,v 1.3.2.2 2012/07/22 08:04:24 darren_r Exp $
7  */
8 #include "ipf.h"
9 
10 void
11 alist_free(hosts)
12 	alist_t *hosts;
13 {
14 	alist_t *a, *next;
15 
16 	for (a = hosts; a != NULL; a = next) {
17 		next = a->al_next;
18 		free(a);
19 	}
20 }
21