summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorQuang Le <quanglex97@gmail.com>2023-09-28 19:44:13 +0200
committerSteve French <stfrench@microsoft.com>2023-09-28 21:49:51 +0200
commite6e43b8aa7cd3c3af686caf0c2e11819a886d705 (patch)
tree49a09c3754101d8d3225a8c2345a029106a286e2 /fs
parentLinux 6.6-rc3 (diff)
downloadlinux-e6e43b8aa7cd3c3af686caf0c2e11819a886d705.tar.xz
linux-e6e43b8aa7cd3c3af686caf0c2e11819a886d705.zip
fs/smb/client: Reset password pointer to NULL
Forget to reset ctx->password to NULL will lead to bug like double free Cc: stable@vger.kernel.org Cc: Willy Tarreau <w@1wt.eu> Reviewed-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Quang Le <quanglex97@gmail.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/smb/client/fs_context.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/smb/client/fs_context.c b/fs/smb/client/fs_context.c
index e45ce31bbda7..a3493da12ad1 100644
--- a/fs/smb/client/fs_context.c
+++ b/fs/smb/client/fs_context.c
@@ -1541,6 +1541,7 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
cifs_parse_mount_err:
kfree_sensitive(ctx->password);
+ ctx->password = NULL;
return -EINVAL;
}