Commit 712917d1c002f820b177683f4fd491289bde3c32
Committed by
Linus Torvalds
1 parent
143f412eb4
Exists in
master
and in
4 other branches
[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>
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
net/sunrpc/clnt.c
| ... | ... | @@ -113,7 +113,7 @@ |
| 113 | 113 | |
| 114 | 114 | err = -EINVAL; |
| 115 | 115 | if (!xprt) |
| 116 | - goto out_err; | |
| 116 | + goto out_no_xprt; | |
| 117 | 117 | if (vers >= program->nrvers || !(version = program->version[vers])) |
| 118 | 118 | goto out_err; |
| 119 | 119 | |
| ... | ... | @@ -182,6 +182,7 @@ |
| 182 | 182 | kfree(clnt); |
| 183 | 183 | out_err: |
| 184 | 184 | xprt_destroy(xprt); |
| 185 | +out_no_xprt: | |
| 185 | 186 | return ERR_PTR(err); |
| 186 | 187 | } |
| 187 | 188 |