diff options
author | tjr <tjr@FreeBSD.org> | 2003-02-25 15:10:23 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2003-02-25 15:10:23 +0000 |
commit | bfe778b442a97c1b19f3b4fff7fff2f4ea5869e3 (patch) | |
tree | e22036b660d0c224ac27422a79cd609de3ed1a02 | |
parent | 8193b0d6a25349dc5c392eaabaa7f5707314edd2 (diff) | |
download | FreeBSD-src-bfe778b442a97c1b19f3b4fff7fff2f4ea5869e3.zip FreeBSD-src-bfe778b442a97c1b19f3b4fff7fff2f4ea5869e3.tar.gz |
Allocate struct ipx_ifaddrs with an initial reference count of 1, not 0.
The wrong reference count was causing them to get freed too early and
have their contents scrambled.
-rw-r--r-- | sys/netipx/ipx.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netipx/ipx.c b/sys/netipx/ipx.c index 0162831..44e6ff9 100644 --- a/sys/netipx/ipx.c +++ b/sys/netipx/ipx.c @@ -142,6 +142,7 @@ ipx_control(so, cmd, data, ifp, td) ia = oia; ifa = (struct ifaddr *)ia; IFA_LOCK_INIT(ifa); + ifa->ifa_refcnt = 1; TAILQ_INSERT_TAIL(&ifp->if_addrhead, ifa, ifa_link); ia->ia_ifp = ifp; ifa->ifa_addr = (struct sockaddr *)&ia->ia_addr; |