提交 8d75da8a 编写于 作者: J J. Bruce Fields

nfsd4: fix minor memory leak

There's no need to allocate this cred more than once.
Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
上级 ccdb357c
...@@ -525,6 +525,8 @@ static struct rpc_cred *callback_cred; ...@@ -525,6 +525,8 @@ static struct rpc_cred *callback_cred;
int set_callback_cred(void) int set_callback_cred(void)
{ {
if (callback_cred)
return 0;
callback_cred = rpc_lookup_machine_cred(); callback_cred = rpc_lookup_machine_cred();
if (!callback_cred) if (!callback_cred)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册