public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [patch]libtirpc: check the makefd_xprt return value
@ 2015-07-09 13:59 ditang chen
  2015-07-13 14:27 ` Chuck Lever
  2015-07-13 14:37 ` Steve Dickson
  0 siblings, 2 replies; 3+ messages in thread
From: ditang chen @ 2015-07-09 13:59 UTC (permalink / raw)
  To: steved; +Cc: linux-nfs

xprt may return NULL, so check the return value is necessary.

Signed-off-by: Ditang Chen <ditang.c@gmail.com>
---
 src/svc_vc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/svc_vc.c b/src/svc_vc.c
index 9824631..f864951 100644
--- a/src/svc_vc.c
+++ b/src/svc_vc.c
@@ -337,6 +337,8 @@ again:
 	 */

 	newxprt = makefd_xprt(sock, r->sendsize, r->recvsize);
+	if (!newxprt)
+		return (FALSE);

 	if (!__rpc_set_netbuf(&newxprt->xp_rtaddr, &addr, len))
 		return (FALSE);
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-13 14:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-09 13:59 [PATCH] [patch]libtirpc: check the makefd_xprt return value ditang chen
2015-07-13 14:27 ` Chuck Lever
2015-07-13 14:37 ` Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox