aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r--fs/cifs/inode.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index e800c0ef54f6..9dffa93d6bdd 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -930,8 +930,10 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode)
930 d_drop(direntry); 930 d_drop(direntry);
931 } else { 931 } else {
932 int obj_type; 932 int obj_type;
933 if (pInfo->Type == -1) /* no return info - go query */ 933 if (pInfo->Type == -1) /* no return info - go query */ {
934 kfree(pInfo);
934 goto mkdir_get_info; 935 goto mkdir_get_info;
936 }
935/*BB check (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID ) to see if need 937/*BB check (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID ) to see if need
936 to set uid/gid */ 938 to set uid/gid */
937 inc_nlink(inode); 939 inc_nlink(inode);
@@ -941,8 +943,10 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode)
941 direntry->d_op = &cifs_dentry_ops; 943 direntry->d_op = &cifs_dentry_ops;
942 944
943 newinode = new_inode(inode->i_sb); 945 newinode = new_inode(inode->i_sb);
944 if (newinode == NULL) 946 if (newinode == NULL) {
947 kfree(pInfo);
945 goto mkdir_get_info; 948 goto mkdir_get_info;
949 }
946 /* Is an i_ino of zero legal? */ 950 /* Is an i_ino of zero legal? */
947 /* Are there sanity checks we can use to ensure that 951 /* Are there sanity checks we can use to ensure that
948 the server is really filling in that field? */ 952 the server is really filling in that field? */