diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/connect.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 0511fdbdf92e..d81e933a796b 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -1648,6 +1648,13 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1648 | goto cifs_parse_mount_err; | 1648 | goto cifs_parse_mount_err; |
1649 | } | 1649 | } |
1650 | 1650 | ||
1651 | vol->UNC = kmalloc(temp_len+1, GFP_KERNEL); | ||
1652 | if (vol->UNC == NULL) { | ||
1653 | printk(KERN_WARNING "CIFS: no memory for UNC\n"); | ||
1654 | goto cifs_parse_mount_err; | ||
1655 | } | ||
1656 | strcpy(vol->UNC, string); | ||
1657 | |||
1651 | if (strncmp(string, "//", 2) == 0) { | 1658 | if (strncmp(string, "//", 2) == 0) { |
1652 | vol->UNC[0] = '\\'; | 1659 | vol->UNC[0] = '\\'; |
1653 | vol->UNC[1] = '\\'; | 1660 | vol->UNC[1] = '\\'; |
@@ -1657,13 +1664,6 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1657 | goto cifs_parse_mount_err; | 1664 | goto cifs_parse_mount_err; |
1658 | } | 1665 | } |
1659 | 1666 | ||
1660 | vol->UNC = kmalloc(temp_len+1, GFP_KERNEL); | ||
1661 | if (vol->UNC == NULL) { | ||
1662 | printk(KERN_WARNING "CIFS: no memory " | ||
1663 | "for UNC\n"); | ||
1664 | goto cifs_parse_mount_err; | ||
1665 | } | ||
1666 | strcpy(vol->UNC, string); | ||
1667 | break; | 1667 | break; |
1668 | case Opt_domain: | 1668 | case Opt_domain: |
1669 | string = match_strdup(args); | 1669 | string = match_strdup(args); |