aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/sess.c
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2007-08-17 20:15:20 -0400
committerSteve French <sfrench@us.ibm.com>2007-08-17 20:15:20 -0400
commit5e6e6232753482dc0024a319b9d8f611d7a80c19 (patch)
tree33727af8b438b861787a7117240656351ee97726 /fs/cifs/sess.c
parentaf5a032b8082cddb4dc62a9ff94bf1ec4d34a044 (diff)
[CIFS] Check return code on failed alloc
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/sess.c')
-rw-r--r--fs/cifs/sess.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index 2ea027dda215..892be9b4d1f3 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -372,6 +372,10 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
372 372
373 /* 2000 big enough to fit max user, domain, NOS name etc. */ 373 /* 2000 big enough to fit max user, domain, NOS name etc. */
374 str_area = kmalloc(2000, GFP_KERNEL); 374 str_area = kmalloc(2000, GFP_KERNEL);
375 if (str_area == NULL) {
376 cifs_small_buf_release(smb_buf);
377 return -ENOMEM;
378 }
375 bcc_ptr = str_area; 379 bcc_ptr = str_area;
376 380
377 ses->flags &= ~CIFS_SES_LANMAN; 381 ses->flags &= ~CIFS_SES_LANMAN;