aboutsummaryrefslogtreecommitdiff
path: root/src/libip/freeipifc.c
blob: 1b3bf0210e4e2f5c22e5851f35cec9fd3f41d7ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <u.h>
#include <libc.h>
#include <ip.h>

void
freeipifc(Ipifc *i)
{
	Ipifc *next;
	Iplifc *l, *lnext;

	for(; i; i=next){
		next = i->next;
		for(l=i->lifc; l; l=lnext){
			lnext = l->next;
			free(l);
		}
		free(i);
	}
}