diff options
author | rwatson <rwatson@FreeBSD.org> | 2005-01-02 15:25:59 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2005-01-02 15:25:59 +0000 |
commit | 232fe9e06de6086ac1663d5e5f95b3a3597fed66 (patch) | |
tree | 481ad283ba3c3c798d8eb817dacd7d91f0bea735 /sys/netipx/ipx_pcb.c | |
parent | 1a1b431cbf2d694fd8f9f16ab0ea6bf4ce674dc9 (diff) | |
download | FreeBSD-src-232fe9e06de6086ac1663d5e5f95b3a3597fed66.zip FreeBSD-src-232fe9e06de6086ac1663d5e5f95b3a3597fed66.tar.gz |
Eliminate XXX comments regarding allocation failures when retrieving
the peer address by using M_WAITOK in ipx_setpeeraddr() to prevent
allocation failure. The socket reference used to reach these calls
will prevent the ipxpcb from being released prematurely.
Diffstat (limited to 'sys/netipx/ipx_pcb.c')
-rw-r--r-- | sys/netipx/ipx_pcb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netipx/ipx_pcb.c b/sys/netipx/ipx_pcb.c index b697616..1c7edeb 100644 --- a/sys/netipx/ipx_pcb.c +++ b/sys/netipx/ipx_pcb.c @@ -301,13 +301,13 @@ ipx_setpeeraddr(ipxp, nam) struct sockaddr **nam; { struct sockaddr_ipx *sipx, ssipx; - + sipx = &ssipx; - bzero((caddr_t)sipx, sizeof(*sipx)); + bzero(sipx, sizeof(*sipx)); sipx->sipx_len = sizeof(*sipx); sipx->sipx_family = AF_IPX; sipx->sipx_addr = ipxp->ipxp_faddr; - *nam = sodupsockaddr((struct sockaddr *)sipx, M_NOWAIT); + *nam = sodupsockaddr((struct sockaddr *)sipx, M_WAITOK); } struct ipxpcb * |