dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
J. Bruce Fields 2010-03-03 16:13:29 -05:00
parent ccdb357ccb
commit 8d75da8afd
1 changed files with 2 additions and 0 deletions

View File

@ -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;