patch-2.2.4 linux/net/sunrpc/auth_unix.c

Next file: linux/net/sunrpc/svcsock.c
Previous file: linux/net/sunrpc/auth_null.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.3/linux/net/sunrpc/auth_unix.c linux/net/sunrpc/auth_unix.c
@@ -68,8 +68,10 @@
 	dprintk("RPC:      allocating UNIX cred for uid %d gid %d\n",
 				current->uid, current->gid);
 
-	if (!(cred = (struct unx_cred *) rpc_malloc(task, sizeof(*cred))))
+	if (!(cred = (struct unx_cred *) rpc_malloc(task, sizeof(*cred)))) {
+		task->tk_status = -ENOMEM;
 		return NULL;
+	}
 
 	cred->uc_count = 0;
 	cred->uc_flags = RPCAUTH_CRED_UPTODATE;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)