Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 478228e5 authored by Dan Carpenter's avatar Dan Carpenter Committed by Steve French
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent f2aee329
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
		}