summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/auth_null.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/auth_null.c')
-rw-r--r--net/sunrpc/auth_null.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/sunrpc/auth_null.c b/net/sunrpc/auth_null.c
index fcd63b5a2..be6d19637 100644
--- a/net/sunrpc/auth_null.c
+++ b/net/sunrpc/auth_null.c
@@ -49,8 +49,11 @@ nul_create_cred(struct rpc_task *task)
{
struct rpc_cred *cred;
- if (!(cred = (struct rpc_cred *) rpc_malloc(task, sizeof(*cred))))
+ if (!(cred = (struct rpc_cred *) rpc_malloc(task, sizeof(*cred)))) {
+ task->tk_status = -ENOMEM;
return NULL;
+ }
+
cred->cr_count = 0;
cred->cr_flags = RPCAUTH_CRED_UPTODATE;