aboutsummaryrefslogtreecommitdiff
path: root/fs/nfsd/nfs4callback.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2010-03-03 16:13:29 -0500
committerJ. Bruce Fields <bfields@citi.umich.edu>2010-03-03 16:13:29 -0500
commit8d75da8afd068fa58b35e69c7c8c46770d9e7a98 (patch)
tree9bec3e2fb1334df46403073e260795d8fd9bf156 /fs/nfsd/nfs4callback.c
parentccdb357ccb77cc4cbe4f7abee9efd19957f0753a (diff)
nfsd4: fix minor memory leak
There's no need to allocate this cred more than once. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/nfsd/nfs4callback.c')
-rw-r--r--fs/nfsd/nfs4callback.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index 8fa412ce802..4bc22c763de 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -525,6 +525,8 @@ static struct rpc_cred *callback_cred;
int set_callback_cred(void)
{
+ if (callback_cred)
+ return 0;
callback_cred = rpc_lookup_machine_cred();
if (!callback_cred)
return -ENOMEM;