aboutsummaryrefslogtreecommitdiff
path: root/src/libip/freeipifc.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-12-31 19:33:03 +0000
committerrsc <devnull@localhost>2005-12-31 19:33:03 +0000
commit9aec88f29cf8145f887f31a4bfc7299f723b72e8 (patch)
tree9adf1d233e7e947a506539efe2bbcaefd96853f4 /src/libip/freeipifc.c
parent9fe7e1a14c84bddc7bb0ec16ce23f44b5479ce94 (diff)
downloadplan9port-9aec88f29cf8145f887f31a4bfc7299f723b72e8.tar.gz
plan9port-9aec88f29cf8145f887f31a4bfc7299f723b72e8.tar.bz2
plan9port-9aec88f29cf8145f887f31a4bfc7299f723b72e8.zip
new
Diffstat (limited to 'src/libip/freeipifc.c')
-rw-r--r--src/libip/freeipifc.c20
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);
+ }
+}
+