Skip to contentSkip to conversation

SUNRPC: Fix a credential refcount leak

PATCH In review Trond Myklebust 2 participants 2 messages Jun 20, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SUNRPC: Fix a credential refcount leak

All callers of __rpc_clone_client() pass in a value for args->cred, meaning that the credential gets assigned and referenced in the call to rpc_new_client().

Fixes 79caa5fad47c ("SUNRPC: Cache cred of process creating the rpc_client")
---
 net/sunrpc/clnt.c | 1 -
 1 file changed, 1 deletion(-)
net/sunrpc/clnt.c +0 -1
index 627a87a71f8b..010e59cf2ae0 100644
@@ -634,7 +634,6 @@ static struct rpc_clnt *__rpc_clone_client(struct rpc_create_args *args,
 	new->cl_discrtry = clnt->cl_discrtry;
 	new->cl_chatty = clnt->cl_chatty;
 	new->cl_principal = clnt->cl_principal;
-	new->cl_cred = get_cred(clnt->cl_cred);
 	return new;
 
 out_err:
Signature · 1 line
2.21.0