mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-21 22:32:45 +00:00
SUNRPC: Ensure get_rpccred() and put_rpccred() can take NULL arguments
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
f538d0ba5b
commit
9a8f6b5ea2
2 changed files with 5 additions and 3 deletions
|
@ -202,7 +202,8 @@ char * rpcauth_stringify_acceptor(struct rpc_cred *);
|
|||
static inline
|
||||
struct rpc_cred * get_rpccred(struct rpc_cred *cred)
|
||||
{
|
||||
atomic_inc(&cred->cr_count);
|
||||
if (cred != NULL)
|
||||
atomic_inc(&cred->cr_count);
|
||||
return cred;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue