diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-03-14 06:20:47 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-14 16:57:17 +0100 |
commit | 712917d1c002f820b177683f4fd491289bde3c32 (patch) | |
tree | 059c7a9871803d8d5b4673d92bf21a9ae7738c8b | |
parent | [PATCH] NFS: Fix a potential panic in O_DIRECT (diff) | |
download | linux-712917d1c002f820b177683f4fd491289bde3c32.tar.xz linux-712917d1c002f820b177683f4fd491289bde3c32.zip |
[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>
-rw-r--r-- | net/sunrpc/clnt.c | 3 |
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, err = -EINVAL; if (!xprt) - goto out_err; + goto out_no_xprt; if (vers >= program->nrvers || !(version = program->version[vers])) goto out_err; @@ -182,6 +182,7 @@ out_no_path: kfree(clnt); out_err: xprt_destroy(xprt); +out_no_xprt: return ERR_PTR(err); } |