Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97966
b: refs/heads/master
c: 79ee9a8
h: refs/heads/master
v: v3
  • Loading branch information
Steve French committed Jun 10, 2008
1 parent 87967a9 commit d08e28e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dbdbb87636e882042cbe53d5d4eac94206f8db83
refs/heads/master: 79ee9a8b2d328243488fee8b55bfacc822049a2a
21 changes: 10 additions & 11 deletions trunk/fs/cifs/cifsfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ cifs_read_super(struct super_block *sb, void *data,
{
struct inode *inode;
struct cifs_sb_info *cifs_sb;
#ifdef CONFIG_CIFS_DFS_UPCALL
int len;
#endif
int rc = 0;

/* BB should we make this contingent on mount parm? */
Expand All @@ -117,15 +114,17 @@ cifs_read_super(struct super_block *sb, void *data,
* complex operation (mount), and in case of fail
* just exit instead of doing mount and attempting
* undo it if this copy fails?*/
len = strlen(data);
cifs_sb->mountdata = kzalloc(len + 1, GFP_KERNEL);
if (cifs_sb->mountdata == NULL) {
kfree(sb->s_fs_info);
sb->s_fs_info = NULL;
return -ENOMEM;
if (data) {
int len = strlen(data);
cifs_sb->mountdata = kzalloc(len + 1, GFP_KERNEL);
if (cifs_sb->mountdata == NULL) {
kfree(sb->s_fs_info);
sb->s_fs_info = NULL;
return -ENOMEM;
}
strncpy(cifs_sb->mountdata, data, len + 1);
cifs_sb->mountdata[len] = '\0';
}
strncpy(cifs_sb->mountdata, data, len + 1);
cifs_sb->mountdata[len] = '\0';
#endif

rc = cifs_mount(sb, cifs_sb, data, devname);
Expand Down

0 comments on commit d08e28e

Please sign in to comment.