mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
[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>
This commit is contained in:
parent
143f412eb4
commit
712917d1c0
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue