Commit e6e43b8a authored by Quang Le's avatar Quang Le Committed by Steve French

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: default avatarNamjae Jeon <linkinjeon@kernel.org>
Signed-off-by: default avatarQuang Le <quanglex97@gmail.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 6465e260
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment