diff options
Diffstat (limited to 'src/libip/freeipifc.c')
-rw-r--r-- | src/libip/freeipifc.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/libip/freeipifc.c b/src/libip/freeipifc.c new file mode 100644 index 00000000..7899facc --- /dev/null +++ b/src/libip/freeipifc.c @@ -0,0 +1,20 @@ +#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); + } +} + |