mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
cifs: Use kzfree() to zero out the password
[ Upstream commit 478228e57f
]
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 <dan.carpenter@oracle.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
16764d7486
commit
3571c9bb01
1 changed files with 1 additions and 1 deletions
|
@ -2567,7 +2567,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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue