[CIFS] Check return code on failed alloc

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
Cyrill Gorcunov
2007-08-18 00:15:20 +00:00
committed by Steve French
parent af5a032b80
commit 5e6e623275
2 changed files with 10 additions and 0 deletions

View File

@@ -372,6 +372,10 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
/* 2000 big enough to fit max user, domain, NOS name etc. */
str_area = kmalloc(2000, GFP_KERNEL);
if (str_area == NULL) {
cifs_small_buf_release(smb_buf);
return -ENOMEM;
}
bcc_ptr = str_area;
ses->flags &= ~CIFS_SES_LANMAN;