Permalink
Browse files

be sure to the head of an addrlist in if_detach().

  • Loading branch information...
1 parent 552fac3 commit f2bfd36dbbf954c51e5e9eec80bff1051a87b7e8 jinmei committed Jun 14, 2003
Showing with 5 additions and 0 deletions.
  1. +5 −0 freebsd4/sys/net/if.c
View
5 freebsd4/sys/net/if.c
@@ -347,6 +347,11 @@ if_detach(ifp)
in6_ifdetach(ifp);
#endif
+ /* We can now free link ifaddr. */
+ ifa = TAILQ_FIRST(&ifp->if_addrhead);
+ TAILQ_REMOVE(&ifp->if_addrhead, ifa, ifa_link);
+ IFAFREE(ifa);
+
/*
* Delete all remaining routes using this interface
* Unfortuneatly the only way to do this is to slog through

0 comments on commit f2bfd36

Please sign in to comment.