summaryrefslogtreecommitdiff
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2014-10-11 11:34:07 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-10-11 11:34:07 -0700
commit9d93551188069a0a21e664b4bfc89ed4a6df1903 (patch)
treebcf7334c0e57323a6844b8147ce1c92180fe8cef /fs/cifs/connect.c
parentdd4cae8bf16611053ee7b00e20aa4fa945b92b99 (diff)
parentbfe01a5ba2490f299e1d2d5508cbbbadd897bbe9 (diff)
Merge tag 'v3.17' into next
Synchronize with mainline to bring in changes to Synaptics and i8042 drivers.
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c2
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,
tmp_end++;
if (!(tmp_end < end && tmp_end[1] == delim)) {
/* No it is not. Set the password to NULL */
+ kfree(vol->password);
vol->password = NULL;
break;
}
@@ -1637,6 +1638,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
options = end;
}
+ kfree(vol->password);
/* Now build new password string */
temp_len = strlen(value);
vol->password = kzalloc(temp_len+1, GFP_KERNEL);