aboutsummaryrefslogtreecommitdiff
path: root/sunrpc/svc_tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sunrpc/svc_tcp.c')
-rw-r--r--sunrpc/svc_tcp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sunrpc/svc_tcp.c b/sunrpc/svc_tcp.c
index efbdd22..12de60f 100644
--- a/sunrpc/svc_tcp.c
+++ b/sunrpc/svc_tcp.c
@@ -271,6 +271,14 @@ again:
* make a new transporter (re-uses xprt)
*/
xprt = makefd_xprt (sock, r->sendsize, r->recvsize);
+
+ /* If we are out of memory, makefd_xprt has already dumped an error. */
+ if (xprt == NULL)
+ {
+ __svc_wait_on_error ();
+ return FALSE;
+ }
+
memcpy (&xprt->xp_raddr, &addr, sizeof (addr));
xprt->xp_addrlen = len;
return FALSE; /* there is never an rpc msg to be processed */