diff options
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 7635b5db26a7..17c3643e5950 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -1624,14 +1624,11 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1624 | case Opt_unc: | 1624 | case Opt_unc: |
1625 | string = vol->UNC; | 1625 | string = vol->UNC; |
1626 | vol->UNC = match_strdup(args); | 1626 | vol->UNC = match_strdup(args); |
1627 | if (vol->UNC == NULL) { | 1627 | if (vol->UNC == NULL) |
1628 | kfree(string); | ||
1629 | goto out_nomem; | 1628 | goto out_nomem; |
1630 | } | ||
1631 | 1629 | ||
1632 | convert_delimiter(vol->UNC, '\\'); | 1630 | convert_delimiter(vol->UNC, '\\'); |
1633 | if (vol->UNC[0] != '\\' || vol->UNC[1] != '\\') { | 1631 | if (vol->UNC[0] != '\\' || vol->UNC[1] != '\\') { |
1634 | kfree(string); | ||
1635 | printk(KERN_ERR "CIFS: UNC Path does not " | 1632 | printk(KERN_ERR "CIFS: UNC Path does not " |
1636 | "begin with // or \\\\\n"); | 1633 | "begin with // or \\\\\n"); |
1637 | goto cifs_parse_mount_err; | 1634 | goto cifs_parse_mount_err; |
@@ -1687,10 +1684,8 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1687 | 1684 | ||
1688 | string = vol->prepath; | 1685 | string = vol->prepath; |
1689 | vol->prepath = match_strdup(args); | 1686 | vol->prepath = match_strdup(args); |
1690 | if (vol->prepath == NULL) { | 1687 | if (vol->prepath == NULL) |
1691 | kfree(string); | ||
1692 | goto out_nomem; | 1688 | goto out_nomem; |
1693 | } | ||
1694 | /* Compare old prefixpath= option to new one */ | 1689 | /* Compare old prefixpath= option to new one */ |
1695 | if (!string || strcmp(string, vol->prepath)) | 1690 | if (!string || strcmp(string, vol->prepath)) |
1696 | printk(KERN_WARNING "CIFS: the value of the " | 1691 | printk(KERN_WARNING "CIFS: the value of the " |