plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

freeipifc.c (231B)


      1 #include <u.h>
      2 #include <libc.h>
      3 #include <ip.h>
      4 
      5 void
      6 freeipifc(Ipifc *i)
      7 {
      8 	Ipifc *next;
      9 	Iplifc *l, *lnext;
     10 
     11 	for(; i; i=next){
     12 		next = i->next;
     13 		for(l=i->lifc; l; l=lnext){
     14 			lnext = l->next;
     15 			free(l);
     16 		}
     17 		free(i);
     18 	}
     19 }