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.
This commit is contained in:
Tim J. Robbins 2003-02-25 15:10:23 +00:00
parent 0f98df2956
commit 93997ef1c9

View File

@ -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;