diff options
author | Henrique Carvalho <henrique.carvalho@suse.com> | 2024-10-22 15:21:26 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-11-01 01:58:31 +0100 |
commit | 35dbac8c328d6afe937cd45ecd41d209d0b9f8b8 (patch) | |
tree | bfb6ae62b74778c9f29b8d08e7af9ac8efa55488 /drivers/acpi/cppc_acpi.c | |
parent | 66921a4d8e844da6668a28ec0885cd471d88dbe1 (diff) |
smb: client: Handle kstrdup failures for passwords
[ Upstream commit 9a5dd61151399ad5a5d69aad28ab164734c1e3bc ]
In smb3_reconfigure(), after duplicating ctx->password and
ctx->password2 with kstrdup(), we need to check for allocation
failures.
If ses->password allocation fails, return -ENOMEM.
If ses->password2 allocation fails, free ses->password, set it
to NULL, and return -ENOMEM.
Fixes: c1eb537bf456 ("cifs: allow changing password during remount")
Reviewed-by: David Howells <dhowells@redhat.com
Signed-off-by: Haoxiang Li <make24@iscas.ac.cn>
Signed-off-by: Henrique Carvalho <henrique.carvalho@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/acpi/cppc_acpi.c')
0 files changed, 0 insertions, 0 deletions