Skip to content

Commit

Permalink
nfsd4: fix minor memory leak
Browse files Browse the repository at this point in the history
There's no need to allocate this cred more than once.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
  • Loading branch information
J. Bruce Fields committed Mar 3, 2010
1 parent ccdb357 commit 8d75da8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/nfsd/nfs4callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8d75da8

Please sign in to comment.