summaryrefslogtreecommitdiffstats
path: root/sys/netipx
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2003-02-25 15:10:23 +0000
committertjr <tjr@FreeBSD.org>2003-02-25 15:10:23 +0000
commitbfe778b442a97c1b19f3b4fff7fff2f4ea5869e3 (patch)
treee22036b660d0c224ac27422a79cd609de3ed1a02 /sys/netipx
parent8193b0d6a25349dc5c392eaabaa7f5707314edd2 (diff)
downloadFreeBSD-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.
Diffstat (limited to 'sys/netipx')
-rw-r--r--sys/netipx/ipx.c1
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;
OpenPOWER on IntegriCloud