diff options
author | rsc <devnull@localhost> | 2005-12-31 19:33:03 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-12-31 19:33:03 +0000 |
commit | 9aec88f29cf8145f887f31a4bfc7299f723b72e8 (patch) | |
tree | 9adf1d233e7e947a506539efe2bbcaefd96853f4 /src/libip/freeipifc.c | |
parent | 9fe7e1a14c84bddc7bb0ec16ce23f44b5479ce94 (diff) | |
download | plan9port-9aec88f29cf8145f887f31a4bfc7299f723b72e8.tar.gz plan9port-9aec88f29cf8145f887f31a4bfc7299f723b72e8.tar.bz2 plan9port-9aec88f29cf8145f887f31a4bfc7299f723b72e8.zip |
new
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); + } +} + |