aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2019-08-27 10:59:17 +0000
committerSteve French <[email protected]>2019-08-27 21:44:27 +0000
commit478228e57f81f6cb60798d54fc02a74ea7dd267e (patch)
tree63d6529141904a79116471fc9ce8307c4c745a66
parentcifs: set domainName when a domain-key is used in multiuser (diff)
downloadkernel-478228e57f81f6cb60798d54fc02a74ea7dd267e.tar.gz
kernel-478228e57f81f6cb60798d54fc02a74ea7dd267e.zip
cifs: Use kzfree() to zero out the password
It's safer to zero out the password so that it can never be disclosed. Fixes: 0c219f5799c7 ("cifs: set domainName when a domain-key is used in multiuser") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Steve French <[email protected]>
-rw-r--r--fs/cifs/connect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 9d2576f31689..ddefddeffd06 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -3101,7 +3101,7 @@ cifs_set_cifscreds(struct smb_vol *vol, struct cifs_ses *ses)
rc = -ENOMEM;
kfree(vol->username);
vol->username = NULL;
- kfree(vol->password);
+ kzfree(vol->password);
vol->password = NULL;
goto out_key_put;
}