mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 11:33:58 -04:00
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 <dan.carpenter@oracle.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
committed by
Steve French
parent
f2aee329a6
commit
478228e57f
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user