diff options
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 03ed8a09581c..36ca2045009b 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -1600,6 +1600,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1600 | tmp_end++; | 1600 | tmp_end++; |
1601 | if (!(tmp_end < end && tmp_end[1] == delim)) { | 1601 | if (!(tmp_end < end && tmp_end[1] == delim)) { |
1602 | /* No it is not. Set the password to NULL */ | 1602 | /* No it is not. Set the password to NULL */ |
1603 | kfree(vol->password); | ||
1603 | vol->password = NULL; | 1604 | vol->password = NULL; |
1604 | break; | 1605 | break; |
1605 | } | 1606 | } |
@@ -1637,6 +1638,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1637 | options = end; | 1638 | options = end; |
1638 | } | 1639 | } |
1639 | 1640 | ||
1641 | kfree(vol->password); | ||
1640 | /* Now build new password string */ | 1642 | /* Now build new password string */ |
1641 | temp_len = strlen(value); | 1643 | temp_len = strlen(value); |
1642 | vol->password = kzalloc(temp_len+1, GFP_KERNEL); | 1644 | vol->password = kzalloc(temp_len+1, GFP_KERNEL); |