xref: /freebsd/sbin/ipf/libipf/alist_free.c (revision 02e9120893770924227138ba49df1edb3896112a)
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(alist_t *hosts)
12 {
13 	alist_t *a, *next;
14 
15 	for (a = hosts; a != NULL; a = next) {
16 		next = a->al_next;
17 		free(a);
18 	}
19 }
20