aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-03-14 00:20:47 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-14 10:57:17 -0500
commit712917d1c002f820b177683f4fd491289bde3c32 (patch)
tree059c7a9871803d8d5b4673d92bf21a9ae7738c8b /net/sunrpc
parent143f412eb4c7cc48b9eb4381f9133b7d36c68075 (diff)
[PATCH] SUNRPC: fix a NULL pointer dereference in net/sunrpc/clnt.c
The Coverity checker spotted this possible NULL pointer dereference in rpc_new_client(). Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/clnt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index d2f0550c4ba0..d78479782045 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -113,7 +113,7 @@ rpc_new_client(struct rpc_xprt *xprt, char *servname,
113 113
114 err = -EINVAL; 114 err = -EINVAL;
115 if (!xprt) 115 if (!xprt)
116 goto out_err; 116 goto out_no_xprt;
117 if (vers >= program->nrvers || !(version = program->version[vers])) 117 if (vers >= program->nrvers || !(version = program->version[vers]))
118 goto out_err; 118 goto out_err;
119 119
@@ -182,6 +182,7 @@ out_no_path:
182 kfree(clnt); 182 kfree(clnt);
183out_err: 183out_err:
184 xprt_destroy(xprt); 184 xprt_destroy(xprt);
185out_no_xprt:
185 return ERR_PTR(err); 186 return ERR_PTR(err);
186} 187}
187 188